summaryrefslogtreecommitdiff
path: root/compiler/GHC/Unit/Module
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Unit/Module')
-rw-r--r--compiler/GHC/Unit/Module/Location.hs6
-rw-r--r--compiler/GHC/Unit/Module/ModSummary.hs6
2 files changed, 9 insertions, 3 deletions
diff --git a/compiler/GHC/Unit/Module/Location.hs b/compiler/GHC/Unit/Module/Location.hs
index 866ccf127a..4d70b43b21 100644
--- a/compiler/GHC/Unit/Module/Location.hs
+++ b/compiler/GHC/Unit/Module/Location.hs
@@ -3,6 +3,7 @@ module GHC.Unit.Module.Location
( ModLocation(..)
, addBootSuffix
, addBootSuffix_maybe
+ , addBootSuffixLocn_maybe
, addBootSuffixLocn
, addBootSuffixLocnOut
, removeBootSuffix
@@ -86,6 +87,11 @@ addBootSuffix_maybe is_boot path = case is_boot of
IsBoot -> addBootSuffix path
NotBoot -> path
+addBootSuffixLocn_maybe :: IsBootInterface -> ModLocation -> ModLocation
+addBootSuffixLocn_maybe is_boot locn = case is_boot of
+ IsBoot -> addBootSuffixLocn locn
+ _ -> locn
+
-- | Add the @-boot@ suffix to all file paths associated with the module
addBootSuffixLocn :: ModLocation -> ModLocation
addBootSuffixLocn locn
diff --git a/compiler/GHC/Unit/Module/ModSummary.hs b/compiler/GHC/Unit/Module/ModSummary.hs
index 9cf736a37a..20d61ad4f8 100644
--- a/compiler/GHC/Unit/Module/ModSummary.hs
+++ b/compiler/GHC/Unit/Module/ModSummary.hs
@@ -16,6 +16,7 @@ module GHC.Unit.Module.ModSummary
, ms_home_srcimps
, ms_home_imps
, msHiFilePath
+ , msDynHiFilePath
, msHsFilePath
, msObjFilePath
, msDynObjFilePath
@@ -151,12 +152,11 @@ ms_home_imps = home_imps . ms_imps
-- The ModLocation is stable over successive up-sweeps in GHCi, wheres
-- the ms_hs_hash and imports can, of course, change
-msHsFilePath, msHiFilePath, msObjFilePath :: ModSummary -> FilePath
+msHsFilePath, msDynHiFilePath, msHiFilePath, msObjFilePath, msDynObjFilePath :: ModSummary -> FilePath
msHsFilePath ms = expectJust "msHsFilePath" (ml_hs_file (ms_location ms))
msHiFilePath ms = ml_hi_file (ms_location ms)
+msDynHiFilePath ms = ml_dyn_hi_file (ms_location ms)
msObjFilePath ms = ml_obj_file (ms_location ms)
-
-msDynObjFilePath :: ModSummary -> FilePath
msDynObjFilePath ms = ml_dyn_obj_file (ms_location ms)
-- | Did this 'ModSummary' originate from a hs-boot file?