| 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
-- 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 )
]
( "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])]
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
\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)