hasMoreBoxityInfo,
resultKind, argKind,
- isUnboxedKind, isTypeKind
+ isUnboxedKind, isTypeKind,
+ notArrowKind
) where
-import Ubiq{-uitous-}
+IMP_Ubiq(){-uitous-}
import Util ( panic, assertPanic )
--import Outputable ( Outputable(..) )
TypeKind `hasMoreBoxityInfo` TypeKind = True
-kind1 `hasMoreBoxityInfo` kind2 = ASSERT( notArrowKind kind1 &&
- notArrowKind kind2 )
- False
+kind1@(ArrowKind _ _) `hasMoreBoxityInfo` kind2@(ArrowKind _ _) = ASSERT( kind1 == kind2 )
+ True
+ -- The two kinds can be arrow kinds; for example when unifying
+ -- (m1 Int) and (m2 Int) we end up unifying m1 and m2, which should
+ -- have the same kind.
+
+kind1 `hasMoreBoxityInfo` kind2 = False
--- Not exported
notArrowKind (ArrowKind _ _) = False
notArrowKind other_kind = True