diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2022-01-10 15:30:21 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-01-12 23:25:49 -0500 |
commit | a31ace56209b583df890a1bffb5a8928aa734aa6 (patch) | |
tree | ce0dbe7eab1ff9167e95f4e0482686f83b2f6764 /compiler/GHC/Driver/Config | |
parent | 7b0c938483bad5a5c96e02c511fb2b2df059154c (diff) | |
download | haskell-a31ace56209b583df890a1bffb5a8928aa734aa6.tar.gz |
Untangled GHC.Types.Id.Make from the driver
Diffstat (limited to 'compiler/GHC/Driver/Config')
-rw-r--r-- | compiler/GHC/Driver/Config/HsToCore.hs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/compiler/GHC/Driver/Config/HsToCore.hs b/compiler/GHC/Driver/Config/HsToCore.hs new file mode 100644 index 0000000000..ef8d6347e2 --- /dev/null +++ b/compiler/GHC/Driver/Config/HsToCore.hs @@ -0,0 +1,19 @@ +module GHC.Driver.Config.HsToCore + ( initBangOpts + ) +where + +import GHC.Types.Id.Make +import GHC.Driver.Session +import qualified GHC.LanguageExtensions as LangExt + +initBangOpts :: DynFlags -> BangOpts +initBangOpts dflags = BangOpts + { bang_opt_strict_data = xopt LangExt.StrictData dflags + , bang_opt_unbox_disable = gopt Opt_OmitInterfacePragmas dflags + -- Don't unbox if we aren't optimising; rather arbitrarily, + -- we use -fomit-iface-pragmas as the indication + , bang_opt_unbox_strict = gopt Opt_UnboxStrictFields dflags + , bang_opt_unbox_small = gopt Opt_UnboxSmallStrictFields dflags + } + |