summaryrefslogtreecommitdiff
path: root/compiler/GHC/Driver/Session.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Driver/Session.hs')
-rw-r--r--compiler/GHC/Driver/Session.hs14
1 files changed, 9 insertions, 5 deletions
diff --git a/compiler/GHC/Driver/Session.hs b/compiler/GHC/Driver/Session.hs
index 969d63a54b..ea82f8d535 100644
--- a/compiler/GHC/Driver/Session.hs
+++ b/compiler/GHC/Driver/Session.hs
@@ -28,7 +28,7 @@ module GHC.Driver.Session (
ProfAuto(..),
glasgowExtsFlags,
warningGroups, warningHierarchies,
- hasPprDebug, hasNoDebugOutput, hasNoStateHack, hasNoOptCoercion,
+ hasPprDebug, hasNoDebugOutput, hasNoStateHack,
dopt, dopt_set, dopt_unset,
gopt, gopt_set, gopt_unset, setGeneralFlag', unSetGeneralFlag',
wopt, wopt_set, wopt_unset,
@@ -1398,9 +1398,6 @@ hasNoDebugOutput = dopt Opt_D_no_debug_output
hasNoStateHack :: DynFlags -> Bool
hasNoStateHack = gopt Opt_G_NoStateHack
-hasNoOptCoercion :: DynFlags -> Bool
-hasNoOptCoercion = gopt Opt_G_NoOptCoercion
-
-- | Test whether a 'DumpFlag' is set
dopt :: DumpFlag -> DynFlags -> Bool
@@ -2236,8 +2233,10 @@ dynamic_flags_deps = [
(NoArg (setGeneralFlag Opt_NoHsMain))
, make_ord_flag defGhcFlag "fno-state-hack"
(NoArg (setGeneralFlag Opt_G_NoStateHack))
+ , make_ord_flag defGhcFlag "fopt-coercion"
+ (NoArg (setGeneralFlag Opt_OptCoercionSimple >> setGeneralFlag Opt_OptCoercionFull))
, make_ord_flag defGhcFlag "fno-opt-coercion"
- (NoArg (setGeneralFlag Opt_G_NoOptCoercion))
+ (NoArg (unSetGeneralFlag Opt_OptCoercionSimple >> unSetGeneralFlag Opt_OptCoercionFull))
, make_ord_flag defGhcFlag "with-rtsopts"
(HasArg setRtsOpts)
, make_ord_flag defGhcFlag "rtsopts"
@@ -3299,6 +3298,8 @@ fFlagsDeps = [
flagSpec "block-layout-weightless" Opt_WeightlessBlocklayout,
flagSpec "omit-interface-pragmas" Opt_OmitInterfacePragmas,
flagSpec "omit-yields" Opt_OmitYields,
+ flagSpec "opt-coercion-full" Opt_OptCoercionFull,
+ flagSpec "opt-coercion-simple" Opt_OptCoercionSimple,
flagSpec "optimal-applicative-do" Opt_OptimalApplicativeDo,
flagSpec "pedantic-bottoms" Opt_PedanticBottoms,
flagSpec "pre-inlining" Opt_SimplPreInlining,
@@ -3868,6 +3869,9 @@ optLevelFlags -- see Note [Documenting optimisation flags]
, ([1,2], Opt_SolveConstantDicts)
, ([1,2], Opt_NumConstantFolding)
+ , ([0,1,2], Opt_OptCoercionSimple)
+ , ([1,2], Opt_OptCoercionFull)
+
, ([2], Opt_LiberateCase)
, ([2], Opt_SpecConstr)
-- , ([2], Opt_RegsGraph)