summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Klebinger <klebinger.andreas@gmx.at>2021-01-20 02:56:18 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-01-22 15:07:53 -0500
commit7b6bb48037969e246a1fb3faffb5af8ebdc14ba3 (patch)
tree45b3813a524cf3b69e3f1a8487a7f3275b87ca62
parent5836efd76ea07f4d62004ee2847abb00adb938e0 (diff)
downloadhaskell-7b6bb48037969e246a1fb3faffb5af8ebdc14ba3.tar.gz
Make DmdAnalOpts a newtype
-rw-r--r--compiler/GHC/Core/Opt/DmdAnal.hs4
-rw-r--r--compiler/GHC/Core/Opt/Pipeline.hs2
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/GHC/Core/Opt/DmdAnal.hs b/compiler/GHC/Core/Opt/DmdAnal.hs
index af0c28e9a1..0d7d8c219b 100644
--- a/compiler/GHC/Core/Opt/DmdAnal.hs
+++ b/compiler/GHC/Core/Opt/DmdAnal.hs
@@ -56,8 +56,8 @@ import GHC.Types.Unique.Set
-}
-- | Options for the demand analysis
-data DmdAnalOpts = DmdAnalOpts
- { dmd_strict_dicts :: !Bool -- ^ Use strict dictionaries
+newtype DmdAnalOpts = DmdAnalOpts
+ { dmd_strict_dicts :: Bool -- ^ Use strict dictionaries
}
-- | Outputs a new copy of the Core program in which binders have been annotated
diff --git a/compiler/GHC/Core/Opt/Pipeline.hs b/compiler/GHC/Core/Opt/Pipeline.hs
index e6c970af9f..76d2f3d459 100644
--- a/compiler/GHC/Core/Opt/Pipeline.hs
+++ b/compiler/GHC/Core/Opt/Pipeline.hs
@@ -1102,7 +1102,7 @@ transferIdInfo exported_id local_id
dmdAnal :: DynFlags -> FamInstEnvs -> [CoreRule] -> CoreProgram -> IO CoreProgram
dmdAnal dflags fam_envs rules binds = do
- let opts = DmdAnalOpts
+ let !opts = DmdAnalOpts
{ dmd_strict_dicts = gopt Opt_DictsStrict dflags
}
binds_plus_dmds = dmdAnalProgram opts fam_envs rules binds