 : update-locs ( loc document -- )
     locs>> [ set-model ] with each ;
 
-: doc-line ( n document -- string ) model-value nth ;
+: doc-line ( n document -- string ) value>> nth ;
 
 : doc-lines ( from to document -- slice )
-    >r 1+ r> model-value <slice> ;
+    >r 1+ r> value>> <slice> ;
 
 : start-on-line ( document from line# -- n1 )
     >r dup first r> = [ nip second ] [ 2drop 0 ] if ;

    [ last-line# ] keep line-end ;

: validate-loc ( loc document -- newloc )
    over first over model-value length >= [
        nip doc-end
    ] [
        over first 0 < [

    ] if ;

: doc-string ( document -- str )
    value>> "\n" join ;

: set-doc-string ( string document -- )
    >r string-lines V{ } like r> [ set-model ] keep
