Commit 502efc7c authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Rename Opt_Allow* to Opt_* to match the language names

parent b5e939da
......@@ -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])]
......
......@@ -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
......
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment