X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcHsType.lhs;h=a63c2cee907628454d2e9c1baad18f60daee5a08;hp=c8c0efcde421860318aa1561609a634647e133ca;hb=432b9c9322181a3644083e3c19b7e240d90659e7;hpb=25cead299c5857b9142a82c917080a654be44b83;ds=inline diff --git a/compiler/typecheck/TcHsType.lhs b/compiler/typecheck/TcHsType.lhs index c8c0efc..a63c2ce 100644 --- a/compiler/typecheck/TcHsType.lhs +++ b/compiler/typecheck/TcHsType.lhs @@ -404,9 +404,14 @@ kc_hs_type (HsForAllTy exp tv_names context ty) ; return (HsForAllTy exp tv_names' ctxt' ty', liftedTypeKind) } -kc_hs_type (HsBangTy b ty) = do - (ty', kind) <- kc_lhs_type ty - return (HsBangTy b ty', kind) +kc_hs_type (HsBangTy b ty) + = do { (ty', kind) <- kc_lhs_type ty + ; return (HsBangTy b ty', kind) } + +kc_hs_type ty@(HsRecTy _) + = failWithTc (ptext (sLit "Unexpected record type") <+> ppr ty) + -- Record types (which only show up temporarily in constructor signatures) + -- should have been removed by now #ifdef GHCI /* Only if bootstrapped */ kc_hs_type (HsSpliceTy sp) = kcSpliceType sp @@ -554,9 +559,12 @@ ds_type ty@(HsTyVar _) ds_type (HsParTy ty) -- Remove the parentheses markers = dsHsType ty -ds_type ty@(HsBangTy _ _) -- No bangs should be here +ds_type ty@(HsBangTy {}) -- No bangs should be here = failWithTc (ptext (sLit "Unexpected strictness annotation:") <+> ppr ty) +ds_type ty@(HsRecTy {}) -- No bangs should be here + = failWithTc (ptext (sLit "Unexpected record type:") <+> ppr ty) + ds_type (HsKindSig ty _) = dsHsType ty -- Kind checking done already