diff src/elaborate.sml @ 1883:5125b1df6045

Save disjointness environments across top-level declarations
author Adam Chlipala <adam@chlipala.net>
date Thu, 17 Oct 2013 09:22:38 -0400
parents d6b0ee53dc93
children b7cd3c7c7edd
line wrap: on
line diff
--- a/src/elaborate.sml	Mon Oct 14 08:08:57 2013 -0400
+++ b/src/elaborate.sml	Thu Oct 17 09:22:38 2013 -0400
@@ -4002,6 +4002,7 @@
                                  end
 
                          val (env', n) = E.pushStrNamed env x sgn'
+
                          val denv' =
                              case #1 str' of
                                  L'.StrConst _ => dopenConstraints (loc, env', denv) {str = x, strs = []}
@@ -4581,16 +4582,12 @@
 
         val (ds', env') = dopen env' {str = top_n, strs = [], sgn = topSgn}
 
-        fun elabDecl' (d, (env, gs)) =
-            let
-                val () = resetKunif ()
-                val () = resetCunif ()
-                val (ds, (env', _, gs)) = elabDecl (d, (env, D.empty, gs))
-            in
-                (ds, (env', gs))
-            end
-
-        val (file, (env'', gs)) = ListUtil.foldlMapConcat elabDecl' (env', []) file
+        fun elabDecl' x =
+            (resetKunif ();
+             resetCunif ();
+             elabDecl x)
+
+        val (file, (env'', _, gs)) = ListUtil.foldlMapConcat elabDecl' (env', D.empty, []) file
 
         fun oneSummaryRound () =
             if ErrorMsg.anyErrors () then