ref: 729bd2ed896899acc1fafbce4d3a69bf28774d78
parent: 5f90bba7f82eaa38e1bffa8c8b0e154143d6848b
author: Lennart Augustsson <lennart.augustsson@epicgames.com>
date: Fri Dec 1 08:35:14 EST 2023
Make => polykinded in the second argument.
--- a/src/MicroHs/TypeCheck.hs
+++ b/src/MicroHs/TypeCheck.hs
@@ -645,8 +645,8 @@
kTypeTypeTypeS = kArrow kType $ kArrow kType kType
-- (=>) :: Constraint -> Type -> Type
-kConstraintTypeTypeS :: EType
-kConstraintTypeTypeS = kArrow kConstraint $ kArrow kType kType
+--kConstraintTypeTypeS :: EType
+--kConstraintTypeTypeS = kArrow kConstraint $ kArrow kType kType
-- (~) :: Type -> Type -> Constraint
kTypeTypeConstraintS :: EType
@@ -687,12 +687,13 @@
let
i = tupleConstr builtinLoc n
in (i, [entry (unIdent i) $ EForall [kk] $ foldr kArrow kv (replicate n kv)])
+ kImplies = EForall [kk] $ kConstraint `kArrow`(kv `kArrow` kv)
in
[
-- The function arrow et al are bothersome to define in Primitives, so keep them here.
-- But the fixity is defined in Primitives.
(mkIdentB "->", [entry nameArrow kTypeTypeTypeS]),
- (mkIdentB "=>", [entry nameImplies kConstraintTypeTypeS]),
+ (mkIdentB "=>", [entry nameImplies kImplies]),
(mkIdentB "~", [entry nameTypeEq kTypeTypeConstraintS]),
-- Primitives.hs uses the type [], and it's annoying to fix that.
-- XXX should not be needed
--
⑨