diff src/elaborate.sml @ 32:0ff8c2728634

Matching values in signatures
author Adam Chlipala <adamc@hcoop.net>
date Thu, 12 Jun 2008 17:35:51 -0400
parents 1c91c5e6840f
children 535c324f0b35
line wrap: on
line diff
--- a/src/elaborate.sml	Thu Jun 12 17:16:20 2008 -0400
+++ b/src/elaborate.sml	Thu Jun 12 17:35:51 2008 -0400
@@ -1072,12 +1072,24 @@
                                      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