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/branches/blume-private-devel/src/cm/bootstrap/build-initdg.sml
ViewVC logotype

Diff of /sml/branches/blume-private-devel/src/cm/bootstrap/build-initdg.sml

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

revision 1634, Tue Sep 28 15:53:10 2004 UTC revision 1635, Tue Sep 28 17:12:31 2004 UTC
# Line 26  Line 26 
26    
27      fun build (gp: GeneralParams.info) specgroup = let      fun build (gp: GeneralParams.info) specgroup = let
28          val ovldR = Control.overloadKW          val ovldR = Control.overloadKW
29            val ovldC = { save'restore =
30                            fn () => let val orig = !ovldR in
31                                      fn () => ovldR := orig
32                                     end,
33                          set = fn () => ovldR := true }
34          val penv = #penv (#param gp)          val penv = #penv (#param gp)
35          val errcons = #errcons gp          val errcons = #errcons gp
36          val groupreg = #groupreg gp          val groupreg = #groupreg gp
# Line 36  Line 41 
41    
42          fun defined symbol = isSome (#get (#symval (#param gp) symbol) ())          fun defined symbol = isSome (#get (#symval (#param gp) symbol) ())
43    
44          fun work (stream, _) = let          fun work stream = let
45              val source = S.newSource (SrcPath.osstring specgroup,              val source = S.newSource (SrcPath.osstring specgroup,
46                                        1, stream, false, errcons)                                        1, stream, false, errcons)
47              val sourceMap = #sourceMap source              val sourceMap = #sourceMap source
# Line 91  Line 96 
96                                            group = (specgroup, (pos, newpos)),                                            group = (specgroup, (pos, newpos)),
97                                            sh_spec = Sharing.DONTCARE,                                            sh_spec = Sharing.DONTCARE,
98                                            setup = (NONE, NONE),                                            setup = (NONE, NONE),
99                                            locl = false }                                            locl = false,
100                                              controllers = [ovldC] }
101                          in                          in
102                              SmlInfo.parse_for_errors gp i;                              SmlInfo.parse_for_errors gp i;
103                              i                              i
# Line 161  Line 167 
167          in          in
168              loop (LSC.UseDefault, StringMap.empty, 1)              loop (LSC.UseDefault, StringMap.empty, 1)
169          end          end
170          fun openIt () = (TextIO.openIn (SrcPath.osstring specgroup),          fun openIt () = TextIO.openIn (SrcPath.osstring specgroup)
                          !ovldR before ovldR := true)  
         fun closeIt (s, savedOvld) =  
             (TextIO.closeIn s;  
              ovldR := savedOvld)  
171      in      in
172          SafeIO.perform { openIt = openIt, closeIt = closeIt, work = work,          SafeIO.perform { openIt = openIt, closeIt = TextIO.closeIn,
173                           cleanup = fn _ => () }                           work = work, cleanup = fn _ => () }
174      end      end
175  end  end

Legend:
Removed from v.1634  
changed lines
  Added in v.1635

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