From ab8c38b97b62a8ff428b536715d50207571345be Mon Sep 17 00:00:00 2001 From: Adam Megacz Date: Sun, 29 May 2011 18:46:11 -0700 Subject: [PATCH] TcHsType: set the kind for tyvars that occur in explicit code types --- compiler/typecheck/TcHsType.lhs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/typecheck/TcHsType.lhs b/compiler/typecheck/TcHsType.lhs index f7f3da6..669c61c 100644 --- a/compiler/typecheck/TcHsType.lhs +++ b/compiler/typecheck/TcHsType.lhs @@ -37,6 +37,7 @@ import TcMType import TcUnify import TcIface import TcType +import TypeRep ( ecKind ) import {- Kind parts of -} Type import Var import VarSet @@ -366,6 +367,7 @@ kc_hs_type (HsPArrTy ty) = do return (HsPArrTy ty', liftedTypeKind) kc_hs_type (HsModalBoxType ecn ty) = do + kc_check_hs_type (HsTyVar ecn) (EK ecKind EkUnk) ty' <- kcLiftedType ty return (HsModalBoxType ecn ty', liftedTypeKind) @@ -594,11 +596,9 @@ ds_type (HsPArrTy ty) = do return (mkPArrTy tau_ty) ds_type (HsModalBoxType ecn ty) = do - ecn' <- ds_app (HsTyVar ecn) [] tau_ty <- dsHsType ty checkWiredInTyCon hetMetCodeTypeTyCon - return (mkHetMetCodeTypeTy (tcGetTyVar "totally bogus, dude" ecn') tau_ty) - + return (mkHetMetCodeTypeTy (mkTyVar ecn ecKind) tau_ty) ds_type (HsTupleTy boxity tys) = do tau_tys <- dsHsTypes tys -- 1.7.10.4