comparison src/jscomp.sml @ 2251:25874084bf1f

Make Mono.file a record for readability upon extension.
author Ziv Scully <ziv@mit.edu>
date Sun, 13 Sep 2015 17:02:17 -0400
parents e10881cd92da
children e843a04499d4
comparison
equal deleted inserted replaced
2250:c275bbc41194 2251:25874084bf1f
77 | (_, someTs) => someTs) someTs cs 77 | (_, someTs) => someTs) someTs cs
78 else 78 else
79 someTs) someTs dts, 79 someTs) someTs dts,
80 nameds) 80 nameds)
81 | (_, state) => state) 81 | (_, state) => state)
82 (IM.empty, IM.empty) (#1 file) 82 (IM.empty, IM.empty) (#decls file)
83 83
84 fun str loc s = (EPrim (Prim.String (Prim.Normal, s)), loc) 84 fun str loc s = (EPrim (Prim.String (Prim.Normal, s)), loc)
85 85
86 fun isNullable (t, _) = 86 fun isNullable (t, _) =
87 case t of 87 case t of
1333 included = IS.empty, 1333 included = IS.empty,
1334 injectors = IM.empty, 1334 injectors = IM.empty,
1335 listInjectors = TM.empty, 1335 listInjectors = TM.empty,
1336 decoders = IM.empty, 1336 decoders = IM.empty,
1337 maxName = U.File.maxName file + 1} 1337 maxName = U.File.maxName file + 1}
1338 (#1 file) 1338 (#decls file)
1339 1339
1340 val inf = TextIO.openIn (OS.Path.joinDirFile {dir = Settings.libJs (), file = "urweb.js"}) 1340 val inf = TextIO.openIn (OS.Path.joinDirFile {dir = Settings.libJs (), file = "urweb.js"})
1341 fun lines acc = 1341 fun lines acc =
1342 case TextIO.inputLine inf of 1342 case TextIO.inputLine inf of
1343 NONE => String.concat (rev acc) 1343 NONE => String.concat (rev acc)
1363 ^ "\ntime_format = \"" ^ Prim.toCString (Settings.getTimeFormat ()) ^ "\";\n" 1363 ^ "\ntime_format = \"" ^ Prim.toCString (Settings.getTimeFormat ()) ^ "\";\n"
1364 else 1364 else
1365 "" 1365 ""
1366 in 1366 in
1367 TextIO.closeIn inf; 1367 TextIO.closeIn inf;
1368 ((DJavaScript script, ErrorMsg.dummySpan) :: ds, #2 file) 1368 {decls = (DJavaScript script, ErrorMsg.dummySpan) :: ds, sideInfo = #sideInfo file}
1369 end 1369 end
1370 1370
1371 end 1371 end