Mercurial > urweb
comparison src/elaborate.sml @ 1387:dd99e1702432
Handle opening of modules that define signatures
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Thu, 06 Jan 2011 19:26:31 -0500 |
parents | e525ad571e15 |
children | f53ec50097a5 |
comparison
equal
deleted
inserted
replaced
1386:64724ef86149 | 1387:dd99e1702432 |
---|---|
2680 case #1 (hnormSgn env sgn) of | 2680 case #1 (hnormSgn env sgn) of |
2681 L'.SgnError => sgn | 2681 L'.SgnError => sgn |
2682 | L'.SgnVar _ => sgn | 2682 | L'.SgnVar _ => sgn |
2683 | 2683 |
2684 | L'.SgnConst sgis => | 2684 | L'.SgnConst sgis => |
2685 (L'.SgnConst (ListUtil.mapConcat (fn (L'.SgiConAbs (x, n, k), loc) => | 2685 (L'.SgnConst (#1 (ListUtil.foldlMapConcat |
2686 [(L'.SgiCon (x, n, k, (L'.CModProj (str, strs, x), loc)), loc)] | 2686 (fn (sgi, env) => |
2687 | (L'.SgiDatatype dts, loc) => | 2687 (case sgi of (L'.SgiConAbs (x, n, k), loc) => |
2688 map (fn (x, n, xs, xncs) => (L'.SgiDatatypeImp (x, n, str, strs, x, xs, xncs), loc)) dts | 2688 [(L'.SgiCon (x, n, k, (L'.CModProj (str, strs, x), loc)), loc)] |
2689 | (L'.SgiClassAbs (x, n, k), loc) => | 2689 | (L'.SgiDatatype dts, loc) => |
2690 [(L'.SgiClass (x, n, k, (L'.CModProj (str, strs, x), loc)), loc)] | 2690 map (fn (x, n, xs, xncs) => (L'.SgiDatatypeImp (x, n, str, strs, x, xs, xncs), loc)) dts |
2691 | (L'.SgiStr (x, n, sgn), loc) => | 2691 | (L'.SgiClassAbs (x, n, k), loc) => |
2692 [(L'.SgiStr (x, n, selfify env {str = str, strs = strs @ [x], sgn = sgn}), loc)] | 2692 [(L'.SgiClass (x, n, k, (L'.CModProj (str, strs, x), loc)), loc)] |
2693 | x => [x]) sgis), #2 sgn) | 2693 | (L'.SgiStr (x, n, sgn), loc) => |
2694 [(L'.SgiStr (x, n, selfify env {str = str, strs = strs @ [x], sgn = sgn}), loc)] | |
2695 | x => [x], | |
2696 E.sgiBinds env sgi)) env sgis)), #2 sgn) | |
2694 | L'.SgnFun _ => sgn | 2697 | L'.SgnFun _ => sgn |
2695 | L'.SgnWhere _ => sgn | 2698 | L'.SgnWhere _ => sgn |
2696 | L'.SgnProj (m, ms, x) => | 2699 | L'.SgnProj (m, ms, x) => |
2697 case E.projectSgn env {str = foldl (fn (m, str) => (L'.StrProj (str, m), #2 sgn)) | 2700 case E.projectSgn env {str = foldl (fn (m, str) => (L'.StrProj (str, m), #2 sgn)) |
2698 (L'.StrVar m, #2 sgn) ms, | 2701 (L'.StrVar m, #2 sgn) ms, |