diff src/name_js.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 38297294cf98
children 8958b580d026
line wrap: on
line diff
--- a/src/name_js.sml	Tue Mar 12 16:21:20 2013 -0400
+++ b/src/name_js.sml	Fri Mar 15 16:09:55 2013 -0400
@@ -72,7 +72,7 @@
 
 fun rewrite file =
     let
-        val (file, _) = ListUtil.foldlMapConcat (fn (d, nextName) =>
+        val (ds, _) = ListUtil.foldlMapConcat (fn (d, nextName) =>
                                                     let
                                                         val (d, (nextName, newDs)) =
                                                             U.Decl.foldMapB {typ = fn x => x,
@@ -143,9 +143,9 @@
                                                                       DValRec vis => [(DValRec (vis @ newDs), #2 d)]
                                                                     | _ => List.revAppend (map (fn vi => (DVal vi, #2 d)) newDs, [d]),
                                                          nextName)
-                                                    end) (U.File.maxName file + 1) file
+                                                    end) (U.File.maxName file + 1) (#1 file)
     in
-        file
+        (ds, #2 file)
     end
 
 end