diff src/elaborate.sml @ 1326:d91f84599693

Instantiate any Unit unification variables that remain after elaboration
author Adam Chlipala <adam@chlipala.net>
date Thu, 02 Dec 2010 14:11:18 -0500
parents df7bfb30dcc3
children 91eaa1542c5a
line wrap: on
line diff
--- a/src/elaborate.sml	Thu Dec 02 12:24:09 2010 -0500
+++ b/src/elaborate.sml	Thu Dec 02 14:11:18 2010 -0500
@@ -495,7 +495,10 @@
        | _ => false
  fun cunifsRemain c =
      case c of
-         L'.CUnif (_, loc, _, _, ref NONE) => SOME loc
+         L'.CUnif (_, loc, k, _, r as ref NONE) =>
+         (case #1 (hnormKind k) of
+              L'.KUnit => (r := SOME (L'.CUnit, loc); NONE)
+            | _ => SOME loc)
        | _ => NONE
 
  val kunifsInDecl = U.Decl.exists {kind = kunifsRemain,