From: Adam Megacz Date: Mon, 30 May 2011 01:46:11 +0000 (-0700) Subject: TcHsType: set the kind for tyvars that occur in explicit code types X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=ab8c38b97b62a8ff428b536715d50207571345be TcHsType: set the kind for tyvars that occur in explicit code types --- 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