diff options
-rw-r--r-- | compiler/GHC/Core/Opt/Simplify/Utils.hs | 8 | ||||
-rw-r--r-- | compiler/GHC/Driver/Config/Core/Opt/Arity.hs | 15 | ||||
-rw-r--r-- | compiler/ghc.cabal.in | 1 |
3 files changed, 18 insertions, 6 deletions
diff --git a/compiler/GHC/Core/Opt/Simplify/Utils.hs b/compiler/GHC/Core/Opt/Simplify/Utils.hs index 92a2a318d7..ac85ebb623 100644 --- a/compiler/GHC/Core/Opt/Simplify/Utils.hs +++ b/compiler/GHC/Core/Opt/Simplify/Utils.hs @@ -63,6 +63,8 @@ import GHC.Core.DataCon ( dataConWorkId, isNullaryRepDataCon ) import GHC.Core.Multiplicity import GHC.Core.Opt.ConstantFold +import GHC.Driver.Config.Core.Opt.Arity + import GHC.Types.Name import GHC.Types.Id import GHC.Types.Id.Info @@ -1825,12 +1827,6 @@ tryEtaExpandRhs env bndr rhs ABot {} -> True -} -initArityOpts :: DynFlags -> ArityOpts -initArityOpts dflags = ArityOpts - { ao_ped_bot = gopt Opt_PedanticBottoms dflags - , ao_dicts_cheap = gopt Opt_DictsCheap dflags - } - {- Note [Eta-expanding at let bindings] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/compiler/GHC/Driver/Config/Core/Opt/Arity.hs b/compiler/GHC/Driver/Config/Core/Opt/Arity.hs new file mode 100644 index 0000000000..c1ffac1270 --- /dev/null +++ b/compiler/GHC/Driver/Config/Core/Opt/Arity.hs @@ -0,0 +1,15 @@ +module GHC.Driver.Config.Core.Opt.Arity + ( initArityOpts + ) where + +import GHC.Prelude () + +import GHC.Driver.Session + +import GHC.Core.Opt.Arity + +initArityOpts :: DynFlags -> ArityOpts +initArityOpts dflags = ArityOpts + { ao_ped_bot = gopt Opt_PedanticBottoms dflags + , ao_dicts_cheap = gopt Opt_DictsCheap dflags + } diff --git a/compiler/ghc.cabal.in b/compiler/ghc.cabal.in index 8c55a17f35..de5450ed47 100644 --- a/compiler/ghc.cabal.in +++ b/compiler/ghc.cabal.in @@ -389,6 +389,7 @@ Library GHC.Driver.Config.Cmm.Parser GHC.Driver.Config.CmmToAsm GHC.Driver.Config.CmmToLlvm + GHC.Driver.Config.Core.Opt.Arity GHC.Driver.Config.Core.Opt.LiberateCase GHC.Driver.Config.Core.Opt.WorkWrap GHC.Driver.Config.Diagnostic |