summaryrefslogtreecommitdiff
path: root/compiler/GHC/Unit/Module/Location.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Unit/Module/Location.hs')
-rw-r--r--compiler/GHC/Unit/Module/Location.hs6
1 files changed, 6 insertions, 0 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