diff options
author | 2008-06-12 17:35:51 -0400 | |
---|---|---|
committer | 2008-06-12 17:35:51 -0400 | |
commit | ed9e3cb10161dde86a87894155f2f74c60d28c4a (patch) | |
tree | 6720f063434c521f4004809f3a557aa8b86a23ce /src/elaborate.sml | |
parent | 2355b20a32d8ed4924cee84a44831061b2b49b49 (diff) |
Matching values in signatures
Diffstat (limited to 'src/elaborate.sml')
-rw-r--r-- | src/elaborate.sml | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/elaborate.sml b/src/elaborate.sml index 3cdb2d9f..c61a84c1 100644 --- a/src/elaborate.sml +++ b/src/elaborate.sml @@ -1072,12 +1072,24 @@ fun subSgn env (all1 as (sgn1, _)) (all2 as (sgn2, loc2)) = end | _ => NONE) + | L'.SgiVal (x, n2, c2) => + seek (fn sgi1All as (sgi1, _) => + case sgi1 of + L'.SgiVal (x, n1, c1) => + let + val () = unifyCons env c1 c2 + handle CUnify (c1, c2, err) => + sgnError env (SgiWrongCon (sgi1All, c1, sgi2All, c2, err)) + in + SOME env + end + | _ => NONE) + | _ => raise Fail "Not ready for more sig matching" end in ignore (foldl folder env sgis2) end - fun elabDecl ((d, loc), env) = let |