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/smlinfo.sml
ViewVC logotype

Diff of /sml/trunk/src/cm/smlfile/smlinfo.sml

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

revision 285, Wed May 19 23:31:25 1999 UTC revision 286, Fri May 21 07:47:16 1999 UTC
# Line 11  Line 11 
11    
12      type info      type info
13    
     type policy = Policy.policy  
14      type complainer = string -> (PrettyPrint.ppstream -> unit) -> unit      type complainer = string -> (PrettyPrint.ppstream -> unit) -> unit
15      type parsetree = GenericVC.Ast.dec      type parsetree = GenericVC.Ast.dec
16    
# Line 20  Line 19 
19      val eq : info * info -> bool        (* compares sourcepaths *)      val eq : info * info -> bool        (* compares sourcepaths *)
20      val compare : info * info -> order  (* compares sourcepaths *)      val compare : info * info -> order  (* compares sourcepaths *)
21    
22      val info : policy ->      val info : GeneralParams.params ->
23          { sourcepath: AbsPath.t,          { sourcepath: AbsPath.t,
24            group: AbsPath.t,            group: AbsPath.t,
25            error: complainer,            error: complainer,
# Line 48  Line 47 
47      structure Print = GenericVC.Control.Print      structure Print = GenericVC.Control.Print
48      structure SF = GenericVC.SmlFile      structure SF = GenericVC.SmlFile
49      structure EM = GenericVC.ErrorMsg      structure EM = GenericVC.ErrorMsg
50        structure FNP = FilenamePolicy
51    
52      type source = Source.inputSource      type source = Source.inputSource
53      type parsetree = GenericVC.Ast.dec      type parsetree = GenericVC.Ast.dec
54    
     type policy = Policy.policy  
55      type complainer = string -> (PrettyPrint.ppstream -> unit) -> unit      type complainer = string -> (PrettyPrint.ppstream -> unit) -> unit
56    
57      datatype info =      datatype info =
# Line 88  Line 87 
87          knownInfo := foldl AbsPathMap.insert' AbsPathMap.empty l          knownInfo := foldl AbsPathMap.insert' AbsPathMap.empty l
88      end      end
89    
90      fun info policy { sourcepath, group, error, history, share } = let      fun info params arg = let
91            val { fnpolicy, groupreg, primconf } = params
92            val { sourcepath, group, error, history, share } = arg
93          fun newinfo () = let          fun newinfo () = let
94              val i = INFO {              val i = INFO {
95                            sourcepath = sourcepath,                            sourcepath = sourcepath,
# Line 96  Line 97 
97                            error = error,                            error = error,
98                            lastseen = ref TStamp.NOTSTAMP,                            lastseen = ref TStamp.NOTSTAMP,
99                            parsetree = ref NONE,                            parsetree = ref NONE,
100                            skelpath = Policy.mkSkelPath policy sourcepath,                            skelpath = FNP.mkSkelPath fnpolicy sourcepath,
101                            skeleton = ref NONE                            skeleton = ref NONE
102                           }                           }
103          in          in
# Line 107  Line 108 
108          case AbsPathMap.find (!knownInfo, sourcepath) of          case AbsPathMap.find (!knownInfo, sourcepath) of
109              SOME (i as INFO { group = g, error = e, ... }) =>              SOME (i as INFO { group = g, error = e, ... }) =>
110                  if AbsPath.compare (group, g) <> EQUAL then                  if AbsPath.compare (group, g) <> EQUAL then
111                      (if GroupReg.registered g then                      (if GroupReg.registered groupreg g then
112                           let val n = AbsPath.name sourcepath                           let val n = AbsPath.name sourcepath
113                           in                           in
114                               error (concat ["ML source file ", n,                               error (concat ["ML source file ", n,
# Line 200  Line 201 
201                                          skeleton := SOME sk);                                          skeleton := SOME sk);
202                                    sk                                    sk
203                                end                                end
204                              | NONE => Skeleton.SeqDecl []))                              | NONE => Skeleton.Seq []))
205      end      end
206    
207      (* first check the time stamp, then do your stuff... *)      (* first check the time stamp, then do your stuff... *)

Legend:
Removed from v.285  
changed lines
  Added in v.286

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