summaryrefslogtreecommitdiff
path: root/compiler/GHC/HsToCore/Usage.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/HsToCore/Usage.hs')
-rw-r--r--compiler/GHC/HsToCore/Usage.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/GHC/HsToCore/Usage.hs b/compiler/GHC/HsToCore/Usage.hs
index e2ac533ba8..59a8c01073 100644
--- a/compiler/GHC/HsToCore/Usage.hs
+++ b/compiler/GHC/HsToCore/Usage.hs
@@ -35,6 +35,7 @@ import GHC.Unit.Module.ModIface
import GHC.Unit.Module.Deps
import GHC.Data.Maybe
+import GHC.Data.FastString
import Data.IORef
import Data.List (sortBy)
@@ -86,7 +87,7 @@ mkUsageInfo uc plugins fc unit_env this_mod dir_imp_mods used_names dependent_fi
let all_home_ids = ue_all_home_unit_ids unit_env
mod_usages <- mk_mod_usage_info uc hu all_home_ids this_mod
dir_imp_mods used_names
- let usages = mod_usages ++ [ UsageFile { usg_file_path = f
+ let usages = mod_usages ++ [ UsageFile { usg_file_path = mkFastString f
, usg_file_hash = hash
, usg_file_label = Nothing }
| (f, hash) <- zip dependent_files hashes ]
@@ -174,7 +175,7 @@ mkObjectUsage pit plugins fc hug th_links_needed th_pkgs_needed = do
msg m = moduleNameString (moduleName m) ++ "[TH] changed"
- fing mmsg fn = UsageFile fn <$> lookupFileCache fc fn <*> pure mmsg
+ fing mmsg fn = UsageFile (mkFastString fn) <$> lookupFileCache fc fn <*> pure mmsg
unlinkedToUsage m ul =
case nameOfObject_maybe ul of