summaryrefslogtreecommitdiff
path: root/compiler/Language/Haskell
diff options
context:
space:
mode:
authorZubin Duggal <zubin.duggal@gmail.com>2022-12-07 19:24:59 +0530
committerMatthew Pickering <matthewtpickering@gmail.com>2023-01-03 12:22:11 +0000
commit62b9a7b23b20f5cf0a2de14251c2096098009f10 (patch)
tree425f6509a48e28c41bdbaff2e7fba6f6749eff8f /compiler/Language/Haskell
parenta5bd0eb8dd1d03c54e1b0b476ebbc4cc886d6f19 (diff)
downloadhaskell-wip/force-docs.tar.gz
Force the Docs structure to prevent leaks in GHCi with -haddock without -fwrite-interfacewip/force-docs
Involves adding many new NFData instances. Without forcing Docs, references to the TcGblEnv for each module are retained by the Docs structure. Usually these are forced when the ModIface is serialised but not when we aren't writing the interface.
Diffstat (limited to 'compiler/Language/Haskell')
-rw-r--r--compiler/Language/Haskell/Syntax/Basic.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/Language/Haskell/Syntax/Basic.hs b/compiler/Language/Haskell/Syntax/Basic.hs
index 77ad3fe0e0..687349d021 100644
--- a/compiler/Language/Haskell/Syntax/Basic.hs
+++ b/compiler/Language/Haskell/Syntax/Basic.hs
@@ -1,4 +1,5 @@
{-# LANGUAGE DeriveDataTypeable #-}
+{-# LANGUAGE GeneralisedNewtypeDeriving #-}
module Language.Haskell.Syntax.Basic where
import Data.Data
@@ -8,6 +9,7 @@ import Data.Bool
import Data.Int (Int)
import GHC.Data.FastString (FastString)
+import Control.DeepSeq
{-
************************************************************************
@@ -54,7 +56,7 @@ Field Labels
-- | Field labels are just represented as strings;
-- they are not necessarily unique (even within a module)
newtype FieldLabelString = FieldLabelString { field_label:: FastString }
- deriving (Data, Eq)
+ deriving (Data, Eq, NFData)
{-
************************************************************************