[project @ 2002-09-09 13:48:01 by simonpj]
authorsimonpj <unknown>
Mon, 9 Sep 2002 13:48:01 +0000 (13:48 +0000)
committersimonpj <unknown>
Mon, 9 Sep 2002 13:48:01 +0000 (13:48 +0000)
The body of a for-all should be of kind *

MERGE TO STABLE

ghc/compiler/typecheck/TcMonoType.lhs

index ac86e09..789e459 100644 (file)
@@ -321,7 +321,10 @@ kcHsType (HsForAllTy (Just tv_names) context ty)
   = kcHsTyVars tv_names                `thenNF_Tc` \ kind_env ->
     tcExtendKindEnv kind_env   $
     kcHsContext context                `thenTc_`
-    kcHsType ty                        `thenTc_`
+    kcLiftedType ty            `thenTc_`
+       -- The body of a forall must be of kind *
+       -- In principle, I suppose, we could allow unlifted types,
+       -- but it seems simpler to stick to lifted types for now.
     returnTc liftedTypeKind
 
 ---------------------------