Mercurial > urweb
comparison 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 |
comparison
equal
deleted
inserted
replaced
31:1c91c5e6840f | 32:0ff8c2728634 |
---|---|
1070 in | 1070 in |
1071 SOME (E.pushCNamedAs env x n2 k2 (SOME c2)) | 1071 SOME (E.pushCNamedAs env x n2 k2 (SOME c2)) |
1072 end | 1072 end |
1073 | _ => NONE) | 1073 | _ => NONE) |
1074 | 1074 |
1075 | L'.SgiVal (x, n2, c2) => | |
1076 seek (fn sgi1All as (sgi1, _) => | |
1077 case sgi1 of | |
1078 L'.SgiVal (x, n1, c1) => | |
1079 let | |
1080 val () = unifyCons env c1 c2 | |
1081 handle CUnify (c1, c2, err) => | |
1082 sgnError env (SgiWrongCon (sgi1All, c1, sgi2All, c2, err)) | |
1083 in | |
1084 SOME env | |
1085 end | |
1086 | _ => NONE) | |
1087 | |
1075 | _ => raise Fail "Not ready for more sig matching" | 1088 | _ => raise Fail "Not ready for more sig matching" |
1076 end | 1089 end |
1077 in | 1090 in |
1078 ignore (foldl folder env sgis2) | 1091 ignore (foldl folder env sgis2) |
1079 end | 1092 end |
1080 | |
1081 | 1093 |
1082 fun elabDecl ((d, loc), env) = | 1094 fun elabDecl ((d, loc), env) = |
1083 let | 1095 let |
1084 | 1096 |
1085 in | 1097 in |