diff src/elaborate.sml @ 33:535c324f0b35

Matching structures in signatures
author Adam Chlipala <adamc@hcoop.net>
date Thu, 12 Jun 2008 17:41:32 -0400
parents 0ff8c2728634
children 44b5405e74c7
line wrap: on
line diff
--- a/src/elaborate.sml	Thu Jun 12 17:35:51 2008 -0400
+++ b/src/elaborate.sml	Thu Jun 12 17:41:32 2008 -0400
@@ -1085,7 +1085,14 @@
                                      end
                                    | _ => NONE)
 
-                      | _ => raise Fail "Not ready for more sig matching"
+                      | L'.SgiStr (x, n2, sgn2) =>
+                        seek (fn sgi1All as (sgi1, _) =>
+                                 case sgi1 of
+                                     L'.SgiStr (x, n1, sgn1) =>
+                                     (subSgn env sgn1 sgn2;
+                                      SOME env)
+                                   | _ => NONE)
+                        (* Add type equations between structures here some day. *)
                 end
         in
             ignore (foldl folder env sgis2)