summaryrefslogtreecommitdiff
path: root/compiler/GHC/Settings.hs
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2020-11-12 10:36:58 +0100
committerSylvain Henry <sylvain@haskus.fr>2020-12-14 19:45:13 +0100
commitd0e8c10d587e4b9984526d0dfcfcb258b75733b8 (patch)
treee0993719d76f87a0f4f8eccef089526217bf5bb4 /compiler/GHC/Settings.hs
parent92377c27e1a48d0d3776f65c7074dfeb122b46db (diff)
downloadhaskell-d0e8c10d587e4b9984526d0dfcfcb258b75733b8.tar.gz
Move Unit related fields from DynFlags to HscEnv
The unit database cache, the home unit and the unit state were stored in DynFlags while they ought to be stored in the compiler session state (HscEnv). This patch fixes this. It introduces a new UnitEnv type that should be used in the future to handle separate unit environments (especially host vs target units). Related to #17957 Bump haddock submodule
Diffstat (limited to 'compiler/GHC/Settings.hs')
-rw-r--r--compiler/GHC/Settings.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/GHC/Settings.hs b/compiler/GHC/Settings.hs
index a26478d3d0..364c481cf6 100644
--- a/compiler/GHC/Settings.hs
+++ b/compiler/GHC/Settings.hs
@@ -9,6 +9,7 @@ module GHC.Settings
, Platform (..)
, PlatformMisc (..)
-- * Accessors
+ , dynLibSuffix
, sProgramName
, sProjectVersion
, sGhcUsagePath
@@ -162,6 +163,10 @@ data GhcNameVersion = GhcNameVersion
, ghcNameVersion_projectVersion :: String
}
+-- | Dynamic library suffix
+dynLibSuffix :: GhcNameVersion -> String
+dynLibSuffix (GhcNameVersion name ver) = '-':name ++ ver
+
-----------------------------------------------------------------------------
-- Accessessors from 'Settings'