X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcMType.lhs;h=eee4ec2403c178246b6a49bc5efe114ac930129c;hb=d0e5514448562cb59852baacb8f433cd88c3370d;hp=90268e442015f064a13c3feced4677641c746508;hpb=cdd7fdacaafc36de12e8d703904667aada6bbe31;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcMType.lhs b/compiler/typecheck/TcMType.lhs index 90268e4..eee4ec2 100644 --- a/compiler/typecheck/TcMType.lhs +++ b/compiler/typecheck/TcMType.lhs @@ -694,8 +694,7 @@ checkValidType :: UserTypeCtxt -> Type -> TcM () -- Checks that the type is valid for the given context checkValidType ctxt ty = traceTc (text "checkValidType" <+> ppr ty) `thenM_` - doptM Opt_ExpressionSignaturesUnboxedTuples `thenM` \ exp_sigs_unboxed -> - doptM Opt_TypeSynonymUnboxedTuples `thenM` \ type_synonym_unboxed -> + doptM Opt_UnboxedTuples `thenM` \ unboxed -> doptM Opt_Rank2Types `thenM` \ rank2 -> doptM Opt_RankNTypes `thenM` \ rankn -> doptM Opt_PolymorphicComponents `thenM` \ polycomp -> @@ -731,9 +730,9 @@ checkValidType ctxt ty other -> isSubArgTypeKind actual_kind ubx_tup = case ctxt of - TySynCtxt _ | type_synonym_unboxed -> UT_Ok - ExprSigCtxt | exp_sigs_unboxed -> UT_Ok - _ -> UT_NotOk + TySynCtxt _ | unboxed -> UT_Ok + ExprSigCtxt | unboxed -> UT_Ok + _ -> UT_NotOk in -- Check that the thing has kind Type, and is lifted if necessary checkTc kind_ok (kindErr actual_kind) `thenM_` @@ -981,7 +980,7 @@ check_class_pred_tys dflags ctxt tys other -> flexible_contexts || all tyvar_head tys where flexible_contexts = dopt Opt_FlexibleContexts dflags - undecidable_ok = dopt Opt_AllowUndecidableInstances dflags + undecidable_ok = dopt Opt_UndecidableInstances dflags ------------------------- tyvar_head ty -- Haskell 98 allows predicates of form @@ -1176,7 +1175,7 @@ instTypeErr pp_ty msg \begin{code} checkValidInstance :: [TyVar] -> ThetaType -> Class -> [TcType] -> TcM () checkValidInstance tyvars theta clas inst_tys - = do { undecidable_ok <- doptM Opt_AllowUndecidableInstances + = do { undecidable_ok <- doptM Opt_UndecidableInstances ; checkValidTheta InstThetaCtxt theta ; checkAmbiguity tyvars theta (tyVarsOfTypes inst_tys)