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/smlfile/skel-io.sml
ViewVC logotype

Diff of /sml/trunk/src/cm/smlfile/skel-io.sml

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

revision 297, Thu May 27 08:29:19 1999 UTC revision 304, Mon May 31 09:10:08 1999 UTC
# Line 9  Line 9 
9      exception InternalError      exception InternalError
10      val read : AbsPath.t * TStamp.t -> Skeleton.decl option      val read : AbsPath.t * TStamp.t -> Skeleton.decl option
11      val write : AbsPath.t * Skeleton.decl -> unit      val write : AbsPath.t * Skeleton.decl -> unit
12        val w_name : Symbol.symbol * string list -> string list
13  end  end
14    
15  structure SkelIO :> SKELIO = struct  structure SkelIO :> SKELIO = struct
# Line 39  Line 40 
40          loop []          loop []
41      end      end
42    
     fun write_decl (s, d) = let  
   
43          (* We are consing up the whole output as a list of strings          (* We are consing up the whole output as a list of strings
44           * before concatenating it to form the final result and           * before concatenating it to form the final result and
45           * wrinting it out using one single `output' call. *)           * wrinting it out using one single `output' call. *)
# Line 53  Line 52 
52                 | _ => raise InternalError)                 | _ => raise InternalError)
53              :: S.name n :: "." :: r              :: S.name n :: "." :: r
54    
55        fun write_decl (s, d) = let
56    
57          (* foldl means that last element appears first in output! *)          (* foldl means that last element appears first in output! *)
58          fun w_list w (l, r) = foldl w (";" :: r) l          fun w_list w (l, r) = foldl w (";" :: r) l
59    

Legend:
Removed from v.297  
changed lines
  Added in v.304

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