Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
502efc7c
Commit
502efc7c
authored
Aug 04, 2007
by
Ian Lynagh
Browse files
Rename Opt_Allow* to Opt_* to match the language names
parent
b5e939da
Changes
3
Hide whitespace changes
Inline
Side-by-side
compiler/main/DynFlags.hs
View file @
502efc7c
...
...
@@ -160,9 +160,9 @@ data DynFlag
|
Opt_WarnTabs
-- language opts
|
Opt_
Allow
OverlappingInstances
|
Opt_
Allow
UndecidableInstances
|
Opt_
Allow
IncoherentInstances
|
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_
Allow
OverlappingInstances
),
(
"AllowOverlappingInstances"
,
Opt_OverlappingInstances
),
-- Deprecated in favour of -XUndecidableInstances:
(
"AllowUndecidableInstances"
,
Opt_
Allow
UndecidableInstances
),
(
"AllowUndecidableInstances"
,
Opt_UndecidableInstances
),
-- Deprecated in favour of -XIncoherentInstances:
(
"AllowIncoherentInstances"
,
Opt_
Allow
IncoherentInstances
)
(
"AllowIncoherentInstances"
,
Opt_IncoherentInstances
)
]
...
...
@@ -1222,9 +1222,9 @@ xFlags = [
(
"MultiParamTypeClasses"
,
Opt_MultiParamTypeClasses
),
(
"FunctionalDependencies"
,
Opt_FunctionalDependencies
),
(
"GeneralizedNewtypeDeriving"
,
Opt_GeneralizedNewtypeDeriving
),
(
"OverlappingInstances"
,
Opt_
Allow
OverlappingInstances
),
(
"UndecidableInstances"
,
Opt_
Allow
UndecidableInstances
),
(
"IncoherentInstances"
,
Opt_
Allow
IncoherentInstances
)
(
"OverlappingInstances"
,
Opt_OverlappingInstances
),
(
"UndecidableInstances"
,
Opt_UndecidableInstances
),
(
"IncoherentInstances"
,
Opt_IncoherentInstances
)
]
impliedFlags
::
[(
DynFlag
,
[
DynFlag
])]
...
...
compiler/typecheck/Inst.lhs
View file @
502efc7c
...
...
@@ -619,8 +619,8 @@ addLocalInst home_ie ispec
getOverlapFlag :: TcM OverlapFlag
getOverlapFlag
= do { dflags <- getDOpts
; let overlap_ok = dopt Opt_
Allow
OverlappingInstances dflags
incoherent_ok = dopt Opt_
Allow
IncoherentInstances dflags
; let overlap_ok = dopt Opt_OverlappingInstances dflags
incoherent_ok = dopt Opt_IncoherentInstances dflags
overlap_flag | incoherent_ok = Incoherent
| overlap_ok = OverlapOk
| otherwise = NoOverlap
...
...
compiler/typecheck/TcMType.lhs
View file @
502efc7c
...
...
@@ -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_
Allow
UndecidableInstances 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_
Allow
UndecidableInstances
= do { undecidable_ok <- doptM Opt_UndecidableInstances
; checkValidTheta InstThetaCtxt theta
; checkAmbiguity tyvars theta (tyVarsOfTypes inst_tys)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment