diff src/elaborate.sml @ 397:4d519baf357c

ListShop skeleton
author Adam Chlipala <adamc@hcoop.net>
date Tue, 21 Oct 2008 12:06:35 -0400
parents 24a31b35e08f
children ebf27030ae3b
line wrap: on
line diff
--- a/src/elaborate.sml	Tue Oct 21 11:39:13 2008 -0400
+++ b/src/elaborate.sml	Tue Oct 21 12:06:35 2008 -0400
@@ -2292,11 +2292,16 @@
                                                                    env
                                                                else
                                                                    E.pushCNamedAs env x n1 (L'.KType, loc)
-                                                                                  (SOME (L'.CNamed n1, loc))
+                                                                                  (SOME (L'.CNamed n2, loc))
                                                  in
                                                      SOME (env, denv)
                                                  end
 
+                                             val env = E.pushCNamedAs env x n1 k' NONE
+                                             val env = if n1 = n2 then
+                                                           env
+                                                       else
+                                                           E.pushCNamedAs env x n2 k' (SOME (L'.CNamed n1, loc))
                                              val env = foldl (fn (x, env) => E.pushCRel env x k) env xs1
                                              fun xncBad ((x1, _, t1), (x2, _, t2)) =
                                                  String.compare (x1, x2) <> EQUAL