comparison src/elaborate.sml @ 1316:df7bfb30dcc3

More hnormKind for isUnitCon
author Adam Chlipala <adam@chlipala.net>
date Sat, 13 Nov 2010 14:38:06 -0500
parents 5337adf33a4a
children d91f84599693
comparison
equal deleted inserted replaced
1315:855c5adafc2d 1316:df7bfb30dcc3
621 L'.TFun _ => false 621 L'.TFun _ => false
622 | L'.TCFun _ => false 622 | L'.TCFun _ => false
623 | L'.TRecord _ => false 623 | L'.TRecord _ => false
624 | L'.TDisjoint _ => false 624 | L'.TDisjoint _ => false
625 625
626 | L'.CRel xn => #1 (#2 (E.lookupCRel env xn)) = L'.KUnit 626 | L'.CRel xn => #1 (hnormKind (#2 (E.lookupCRel env xn))) = L'.KUnit
627 | L'.CNamed xn => #1 (#2 (E.lookupCNamed env xn)) = L'.KUnit 627 | L'.CNamed xn => #1 (hnormKind (#2 (E.lookupCNamed env xn))) = L'.KUnit
628 | L'.CModProj (n, ms, x) => false 628 | L'.CModProj (n, ms, x) => false
629 (*let 629 (*let
630 val (_, sgn) = E.lookupStrNamed env n 630 val (_, sgn) = E.lookupStrNamed env n
631 val (str, sgn) = foldl (fn (m, (str, sgn)) => 631 val (str, sgn) = foldl (fn (m, (str, sgn)) =>
632 case E.projectStr env {sgn = sgn, str = str, field = m} of 632 case E.projectStr env {sgn = sgn, str = str, field = m} of
659 (*(case hnormKind (kindof env c) of 659 (*(case hnormKind (kindof env c) of
660 (L'.KTuple ks, _) => #1 (List.nth (ks, n - 1)) = L'.KUnit 660 (L'.KTuple ks, _) => #1 (List.nth (ks, n - 1)) = L'.KUnit
661 | k => raise CUnify' (CKindof (k, c, "tuple")))*) 661 | k => raise CUnify' (CKindof (k, c, "tuple")))*)
662 662
663 | L'.CError => false 663 | L'.CError => false
664 | L'.CUnif (_, _, k, _, _) => #1 k = L'.KUnit 664 | L'.CUnif (_, _, k, _, _) => #1 (hnormKind k) = L'.KUnit
665 665
666 | L'.CKAbs _ => false 666 | L'.CKAbs _ => false
667 | L'.CKApp _ => false 667 | L'.CKApp _ => false
668 | L'.TKFun _ => false 668 | L'.TKFun _ => false
669 669