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 354, Fri Jun 25 08:36:12 1999 UTC revision 361, Wed Jun 30 06:44:04 1999 UTC
# Line 75  Line 75 
75    
76      datatype info =      datatype info =
77          INFO of { sourcepath: SrcPath.t,          INFO of { sourcepath: SrcPath.t,
78                    skelname: string,                    mkSkelname: unit -> string,
79                    binname: string,                    mkBinname: unit -> string,
80                    persinfo: persinfo,                    persinfo: persinfo,
81                    share: bool option,                    share: bool option,
82                    split: bool }                    split: bool }
# Line 84  Line 84 
84      type ord_key = info      type ord_key = info
85    
86      fun sourcepath (INFO { sourcepath = sp, ... }) = sp      fun sourcepath (INFO { sourcepath = sp, ... }) = sp
87      fun skelname (INFO { skelname = sn, ... }) = sn      fun skelname (INFO { mkSkelname = msn, ... }) = msn ()
88      fun binname (INFO { binname = bn, ... }) = bn      fun binname (INFO { mkBinname = mbn, ... }) = mbn ()
89      fun share (INFO { share = s, ... }) = s      fun share (INFO { share = s, ... }) = s
90      fun split (INFO { split = s, ... }) = s      fun split (INFO { split = s, ... }) = s
91    
# Line 130  Line 130 
130      fun info (gp: GeneralParams.info) arg = let      fun info (gp: GeneralParams.info) arg = let
131          val { sourcepath, group = gr as (group, region), share, split } = arg          val { sourcepath, group = gr as (group, region), share, split } = arg
132          val policy = #fnpolicy (#param gp)          val policy = #fnpolicy (#param gp)
133          val skelname = FNP.mkSkelName policy sourcepath          fun mkSkelname () = FNP.mkSkelName policy sourcepath
134          val binname = FNP.mkBinName policy sourcepath          fun mkBinname () = FNP.mkBinName policy sourcepath
135          val groupreg = #groupreg gp          val groupreg = #groupreg gp
136          fun newpersinfo () = let          fun newpersinfo () = let
137              val ts = SrcPath.tstamp sourcepath              val ts = SrcPath.tstamp sourcepath
# Line 166  Line 166 
166                      else (validate (sourcepath, pi); pi)                      else (validate (sourcepath, pi); pi)
167      in      in
168          INFO { sourcepath = sourcepath,          INFO { sourcepath = sourcepath,
169                 skelname = skelname,                 mkSkelname = mkSkelname,
170                 binname = binname,                 mkBinname = mkBinname,
171                 persinfo = persinfo (),                 persinfo = persinfo (),
172                 share = share,                 share = share,
173                 split = split }                 split = split }
# Line 207  Line 207 
207      end      end
208    
209      fun getSkeleton gp (i as INFO ir, noerrors) = let      fun getSkeleton gp (i as INFO ir, noerrors) = let
210          val { sourcepath, skelname, persinfo = PERS pir, ... } = ir          val { sourcepath, mkSkelname, persinfo = PERS pir, ... } = ir
211          val { skeleton, lastseen, ... } = pir          val { skeleton, lastseen, ... } = pir
212      in      in
213          case !skeleton of          case !skeleton of
214              SOME sk => SOME sk              SOME sk => SOME sk
215            | NONE =>            | NONE => let
216                  (case SkelIO.read (skelname, !lastseen) of                  val skelname = mkSkelname ()
217                in
218                    case SkelIO.read (skelname, !lastseen) of
219                       SOME sk => (skeleton := SOME sk; SOME sk)                       SOME sk => (skeleton := SOME sk; SOME sk)
220                     | NONE =>                     | NONE =>
221                           (case getParseTree gp (i, false, noerrors) of                           (case getParseTree gp (i, false, noerrors) of
# Line 235  Line 237 
237                                          skeleton := SOME sk);                                          skeleton := SOME sk);
238                                    SOME sk                                    SOME sk
239                                end                                end
240                              | NONE => NONE))                             | NONE => NONE)
241                end
242      end      end
243    
244      fun skeleton0 noerrors gp i = getSkeleton gp (i, noerrors)      fun skeleton0 noerrors gp i = getSkeleton gp (i, noerrors)

Legend:
Removed from v.354  
changed lines
  Added in v.361

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