From: Ian Lynagh Date: Sat, 4 Aug 2007 15:54:25 +0000 (+0000) Subject: Rename Opt_Allow* to Opt_* to match the language names X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=502efc7c6fc4413ef341718451931cfd7f7c2666 Rename Opt_Allow* to Opt_* to match the language names --- diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index bbcf40d..ac8c606 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -160,9 +160,9 @@ data DynFlag | Opt_WarnTabs -- language opts - | Opt_AllowOverlappingInstances - | Opt_AllowUndecidableInstances - | Opt_AllowIncoherentInstances + | Opt_OverlappingInstances + | Opt_UndecidableInstances + | Opt_IncoherentInstances | Opt_MonomorphismRestriction | Opt_MonoPatBinds | Opt_ExtendedDefaultRules -- Use GHC's extended rules for defaulting @@ -1162,11 +1162,11 @@ fFlags = [ -- Deprecated in favour of -XPArr: ( "parr", Opt_PArr ), -- Deprecated in favour of -XOverlappingInstances: - ( "AllowOverlappingInstances", Opt_AllowOverlappingInstances ), + ( "AllowOverlappingInstances", Opt_OverlappingInstances ), -- Deprecated in favour of -XUndecidableInstances: - ( "AllowUndecidableInstances", Opt_AllowUndecidableInstances ), + ( "AllowUndecidableInstances", Opt_UndecidableInstances ), -- Deprecated in favour of -XIncoherentInstances: - ( "AllowIncoherentInstances", Opt_AllowIncoherentInstances ) + ( "AllowIncoherentInstances", Opt_IncoherentInstances ) ] @@ -1222,9 +1222,9 @@ xFlags = [ ( "MultiParamTypeClasses", Opt_MultiParamTypeClasses ), ( "FunctionalDependencies", Opt_FunctionalDependencies ), ( "GeneralizedNewtypeDeriving", Opt_GeneralizedNewtypeDeriving ), - ( "OverlappingInstances", Opt_AllowOverlappingInstances ), - ( "UndecidableInstances", Opt_AllowUndecidableInstances ), - ( "IncoherentInstances", Opt_AllowIncoherentInstances ) + ( "OverlappingInstances", Opt_OverlappingInstances ), + ( "UndecidableInstances", Opt_UndecidableInstances ), + ( "IncoherentInstances", Opt_IncoherentInstances ) ] impliedFlags :: [(DynFlag, [DynFlag])] diff --git a/compiler/typecheck/Inst.lhs b/compiler/typecheck/Inst.lhs index 04dd4a2..8195a82 100644 --- a/compiler/typecheck/Inst.lhs +++ b/compiler/typecheck/Inst.lhs @@ -619,8 +619,8 @@ addLocalInst home_ie ispec getOverlapFlag :: TcM OverlapFlag getOverlapFlag = do { dflags <- getDOpts - ; let overlap_ok = dopt Opt_AllowOverlappingInstances dflags - incoherent_ok = dopt Opt_AllowIncoherentInstances dflags + ; let overlap_ok = dopt Opt_OverlappingInstances dflags + incoherent_ok = dopt Opt_IncoherentInstances dflags overlap_flag | incoherent_ok = Incoherent | overlap_ok = OverlapOk | otherwise = NoOverlap diff --git a/compiler/typecheck/TcMType.lhs b/compiler/typecheck/TcMType.lhs index 955d45c..eee4ec2 100644 --- a/compiler/typecheck/TcMType.lhs +++ b/compiler/typecheck/TcMType.lhs @@ -980,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 @@ -1175,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)