summaryrefslogtreecommitdiff
path: root/compiler/typecheck
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2011-12-13 12:30:40 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2011-12-13 12:30:40 +0000
commit0f34f30839c9f382bdeab0335675ce8491361d67 (patch)
tree30ee044a06c78e035df2bfc76c4e9a3e4547ff9e /compiler/typecheck
parent83030e70225fcf5bbeb6683194fd7b66c47fe3dc (diff)
downloadhaskell-0f34f30839c9f382bdeab0335675ce8491361d67.tar.gz
Document the "kind invariant", and check it
See Note [The kind invariant] in TypeRep Checked in CoreLint All this arises from Trac #5426
Diffstat (limited to 'compiler/typecheck')
-rw-r--r--compiler/typecheck/TcMType.lhs4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/typecheck/TcMType.lhs b/compiler/typecheck/TcMType.lhs
index 409dd722e7..2bbb2e11eb 100644
--- a/compiler/typecheck/TcMType.lhs
+++ b/compiler/typecheck/TcMType.lhs
@@ -1116,6 +1116,10 @@ check_arg_type rank ty
; check_type rank' UT_NotOk ty
; checkTc (not (isUnLiftedType ty)) (unliftedArgErr ty) }
+ -- NB the isUnLiftedType test also checks for
+ -- T State#
+ -- where there is an illegal partial application of State# (which has
+ -- kind * -> #); see Note [The kind invariant] in TypeRep
----------------------------------------
forAllTyErr :: Rank -> Type -> SDoc