diff src/elab_ops.sml @ 1639:6c00d8af6239

Add a new scoping check for unification variables, to fix a type inference bug
author Adam Chlipala <adam@chlipala.net>
date Sun, 18 Dec 2011 11:29:13 -0500
parents 20f898c29525
children d6c45026240d
line wrap: on
line diff
--- a/src/elab_ops.sml	Sat Dec 17 20:42:39 2011 -0500
+++ b/src/elab_ops.sml	Sun Dec 18 11:29:13 2011 -0500
@@ -156,7 +156,7 @@
 
 fun hnormCon env (cAll as (c, loc)) =
     case c of
-        CUnif (nl, _, _, _, ref (SOME c)) => (#1 (hnormCon env (E.mliftConInCon nl c)), loc)
+        CUnif (nl, _, _, _, ref (Known c)) => (#1 (hnormCon env (E.mliftConInCon nl c)), loc)
 
       | CNamed xn =>
         (case E.lookupCNamed env xn of
@@ -277,7 +277,7 @@
                                   let
                                       fun cunif () =
                                           let
-                                              val r = ref NONE
+                                              val r = ref (Unknown (fn _ => true))
                                           in
                                               (r, (CUnif (0, loc, (KType, loc), "_", r), loc))
                                           end