X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcHsType.lhs;h=f7f3da6f99633a8e28183a723c98852b5a11c736;hb=6cec61d14a324285dbb8ce73d4c7215f1f8d6766;hp=43e58be31e860db38ced6c7e5e37a17be3e67778;hpb=a3bab0506498db41853543558c52a4fda0d183af;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcHsType.lhs b/compiler/typecheck/TcHsType.lhs index 43e58be..f7f3da6 100644 --- a/compiler/typecheck/TcHsType.lhs +++ b/compiler/typecheck/TcHsType.lhs @@ -365,6 +365,10 @@ kc_hs_type (HsPArrTy ty) = do ty' <- kcLiftedType ty return (HsPArrTy ty', liftedTypeKind) +kc_hs_type (HsModalBoxType ecn ty) = do + ty' <- kcLiftedType ty + return (HsModalBoxType ecn ty', liftedTypeKind) + kc_hs_type (HsNumTy n) = return (HsNumTy n, liftedTypeKind) @@ -589,6 +593,13 @@ ds_type (HsPArrTy ty) = do checkWiredInTyCon parrTyCon 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) + + ds_type (HsTupleTy boxity tys) = do tau_tys <- dsHsTypes tys checkWiredInTyCon tycon @@ -867,7 +878,7 @@ tcPatSig ctxt sig res_ty ; if null sig_tvs then do { -- The type signature binds no type variables, -- and hence is rigid, so use it to zap the res_ty - wrap <- tcSubType PatSigOrigin (SigSkol ctxt) res_ty sig_ty + wrap <- tcSubType PatSigOrigin ctxt res_ty sig_ty ; return (sig_ty, [], wrap) } else do { @@ -896,7 +907,7 @@ tcPatSig ctxt sig res_ty ; sig_tvs' <- tcInstSigTyVars sig_tvs ; let sig_ty' = substTyWith sig_tvs sig_tv_tys' sig_ty sig_tv_tys' = mkTyVarTys sig_tvs' - ; wrap <- tcSubType PatSigOrigin (SigSkol ctxt) res_ty sig_ty' + ; wrap <- tcSubType PatSigOrigin ctxt res_ty sig_ty' -- Check that each is bound to a distinct type variable, -- and one that is not already in scope