diff options
author | Zubin Duggal <zubin.duggal@gmail.com> | 2023-05-04 06:07:40 +0530 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2023-05-16 14:00:00 -0400 |
commit | 6231a126562db917c882fdc5ecd0769081032d90 (patch) | |
tree | 9454e3e45dde97975238911a3874b177cb9d814c /compiler/GHC/Iface/Recomp.hs | |
parent | b70bc6900fcee7ff1e334bf8099283f610d6f9d4 (diff) | |
download | haskell-6231a126562db917c882fdc5ecd0769081032d90.tar.gz |
compiler: Use compact representation for UsageFile (#22744)
Use FastString to store filepaths in interface files, as this data is
highly redundant so we want to share all instances of filepaths in the
compiler session.
Diffstat (limited to 'compiler/GHC/Iface/Recomp.hs')
-rw-r--r-- | compiler/GHC/Iface/Recomp.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/Iface/Recomp.hs b/compiler/GHC/Iface/Recomp.hs index b0e668f0e6..298e876595 100644 --- a/compiler/GHC/Iface/Recomp.hs +++ b/compiler/GHC/Iface/Recomp.hs @@ -771,12 +771,12 @@ checkModUsage fc UsageFile{ usg_file_path = file, usg_file_label = mlabel } = liftIO $ handleIO handler $ do - new_hash <- lookupFileCache fc file + new_hash <- lookupFileCache fc $ unpackFS file if (old_hash /= new_hash) then return recomp else return UpToDate where - reason = FileChanged file + reason = FileChanged $ unpackFS file recomp = needsRecompileBecause $ fromMaybe reason $ fmap CustomReason mlabel handler = if debugIsOn then \e -> pprTrace "UsageFile" (text (show e)) $ return recomp |