Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/src/cm/paths/srcpath.sml
ViewVC logotype

Diff of /sml/trunk/src/cm/paths/srcpath.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 675, Fri Jun 23 09:18:18 2000 UTC revision 676, Sat Jun 24 03:37:03 2000 UTC
# Line 42  Line 42 
42      val get_anchor : env * anchor -> string option      val get_anchor : env * anchor -> string option
43      val reset_anchors : env -> unit      val reset_anchors : env -> unit
44    
45      val processSpecFile : env * string -> unit      val processSpecFile : env * string -> unit (* must sync afterwards! *)
46    
47      (* non-destructive bindings for anchors (for anchor scoping) *)      (* non-destructive bindings for anchors (for anchor scoping) *)
48      val bind: env -> rebindings -> env      val bind: env -> rebindings -> env
# Line 381  Line 381 
381      fun set0 mkAbsolute (e: env, a, so) = let      fun set0 mkAbsolute (e: env, a, so) = let
382          fun name2pp s = string2pp (if P.isAbsolute s then s else mkAbsolute s)          fun name2pp s = string2pp (if P.isAbsolute s then s else mkAbsolute s)
383      in      in
384          #set_free e (a, Option.map name2pp so);          #set_free e (a, Option.map name2pp so)
         sync ()  
385      end      end
386    
387      fun set_anchor x =      fun set_anchor x =
388          set0 (fn n => P.mkAbsolute { path = n, relativeTo = F.getDir () }) x          set0 (fn n => P.mkAbsolute { path = n, relativeTo = F.getDir () }) x
389            before sync ()
390    
391      fun reset_anchors (e: env) = (#reset e (); sync ())      fun reset_anchors (e: env) = (#reset e (); sync ())
392    
# Line 401  Line 401 
401                  else if String.sub (line, 0) = #"#" then loop ()                  else if String.sub (line, 0) = #"#" then loop ()
402                  else case String.tokens Char.isSpace line of                  else case String.tokens Char.isSpace line of
403                           [a, d] => (set (e, a, SOME d); loop ())                           [a, d] => (set (e, a, SOME d); loop ())
404                         | ["-"] => (reset_anchors e; loop ())                         | ["-"] => (#reset e (); loop ())
405                         | [a] => (set_anchor (e, a, NONE); loop ())                         | [a] => (set (e, a, NONE); loop ())
406                         | [] => loop ()                         | [] => loop ()
407                         | _ => (Say.say [f, ": malformed line (ignored)\n"];                         | _ => (Say.say [f, ": malformed line (ignored)\n"];
408                                 loop ())                                 loop ())

Legend:
Removed from v.675  
changed lines
  Added in v.676

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0