summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2021-10-08 09:57:56 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-10-12 19:17:15 -0400
commit053d9deb3c107db0d292a6a8dc4ba8cf2d432743 (patch)
tree984679dc39776770f88eb19add968af932f0d577
parent7215f6dec0bb4db6fe1dc2ef0a126ea37a0d884b (diff)
downloadhaskell-053d9deb3c107db0d292a6a8dc4ba8cf2d432743.tar.gz
Make the fields of MakeEnv strict
There's no reason for them to be lazy, and in particular we would like to make sure the old_hpt field is evaluated.
-rw-r--r--compiler/GHC/Driver/Make.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/GHC/Driver/Make.hs b/compiler/GHC/Driver/Make.hs
index 7a869d09cd..1482bdb539 100644
--- a/compiler/GHC/Driver/Make.hs
+++ b/compiler/GHC/Driver/Make.hs
@@ -921,11 +921,11 @@ withAbstractSem :: AbstractSem -> IO b -> IO b
withAbstractSem sem = MC.bracket_ (acquireSem sem) (releaseSem sem)
-- | Environment used when compiling a module
-data MakeEnv = MakeEnv { hsc_env :: HscEnv -- The basic HscEnv which will be augmented for each module
- , old_hpt :: HomePackageTable -- A cache of old interface files
- , compile_sem :: AbstractSem
- , lqq_var :: TVar LogQueueQueue
- , env_messager :: Maybe Messager
+data MakeEnv = MakeEnv { hsc_env :: !HscEnv -- The basic HscEnv which will be augmented for each module
+ , old_hpt :: !HomePackageTable -- A cache of old interface files
+ , compile_sem :: !AbstractSem
+ , lqq_var :: !(TVar LogQueueQueue)
+ , env_messager :: !(Maybe Messager)
}
type RunMakeM a = ReaderT MakeEnv (MaybeT IO) a