diff src/jscomp.sml @ 1845:c1e3805e604e

Make Scriptcheck catch more script/message-passing uses, and move the phase earlier in compilation
author Adam Chlipala <adam@chlipala.net>
date Fri, 15 Mar 2013 16:09:55 -0400
parents 10a2cb93d175
children 8958b580d026
line wrap: on
line diff
--- a/src/jscomp.sml	Tue Mar 12 16:21:20 2013 -0400
+++ b/src/jscomp.sml	Fri Mar 15 16:09:55 2013 -0400
@@ -61,7 +61,7 @@
 
 fun inString {needle, haystack} = String.isSubstring needle haystack
 
-fun process file =
+fun process (file : file) =
     let
         val (someTs, nameds) =
             foldl (fn ((DVal (_, n, t, e, _), _), (someTs, nameds)) => (someTs, IM.insert (nameds, n, e))
@@ -77,7 +77,7 @@
                                      someTs) someTs dts,
                        nameds)
                     | (_, state) => state)
-                  (IM.empty, IM.empty) file
+                  (IM.empty, IM.empty) (#1 file)
 
         fun str loc s = (EPrim (Prim.String s), loc)
 
@@ -1304,7 +1304,7 @@
                         listInjectors = TM.empty,
                         decoders = IM.empty,
                         maxName = U.File.maxName file + 1}
-                       file
+                       (#1 file)
 
         val inf = TextIO.openIn (OS.Path.joinDirFile {dir = Settings.libJs (), file = "urweb.js"})
         fun lines acc =
@@ -1334,7 +1334,7 @@
                 ""
     in
         TextIO.closeIn inf;
-        (DJavaScript script, ErrorMsg.dummySpan) :: ds
+        ((DJavaScript script, ErrorMsg.dummySpan) :: ds, #2 file)
     end
 
 end