summaryrefslogtreecommitdiff
path: root/src/elaborate.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-08-16 12:15:38 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-08-16 12:15:38 -0400
commit58a120615454c5eb73b560f8d3de6a45310d4aab (patch)
tree4d852c455a49058e8ade712c4e0e4bdd1a943697 /src/elaborate.sml
parent3c28b7024034c5969525035f8b602272441dd323 (diff)
Stub WHERE support
Diffstat (limited to 'src/elaborate.sml')
-rw-r--r--src/elaborate.sml16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/elaborate.sml b/src/elaborate.sml
index beea1a76..41c9e6df 100644
--- a/src/elaborate.sml
+++ b/src/elaborate.sml
@@ -682,9 +682,14 @@ and recordSummary (env, denv) c =
end
and consEq (env, denv) (c1, c2) =
- (case unifyCons (env, denv) c1 c2 of
- [] => true
- | _ => false)
+ let
+ val gs = unifyCons (env, denv) c1 c2
+ in
+ List.all (fn (loc, env, denv, c1, c2) =>
+ case D.prove env denv (c1, c2, loc) of
+ [] => true
+ | _ => false) gs
+ end
handle CUnify _ => false
and consNeq env (c1, c2) =
@@ -857,7 +862,9 @@ and unifyCons' (env, denv) c1 c2 =
and unifyCons'' (env, denv) (c1All as (c1, loc)) (c2All as (c2, _)) =
let
- fun err f = raise CUnify' (f (c1All, c2All))
+ fun err f = (prefaces "unifyCons'' fails" [("c1All", p_con env c1All),
+ ("c2All", p_con env c2All)];
+ raise CUnify' (f (c1All, c2All)))
fun isRecord () = unifyRecordCons (env, denv) (c1All, c2All)
in
@@ -956,7 +963,6 @@ and unifyCons'' (env, denv) (c1All as (c1, loc)) (c2All as (c2, _)) =
unifyKinds ran1 ran2;
[])
-
| _ => err CIncompatible
end