diff options
author | Zubin Duggal <zubin.duggal@gmail.com> | 2023-05-16 14:34:19 +0530 |
---|---|---|
committer | Zubin Duggal <zubin.duggal@gmail.com> | 2023-05-17 12:21:31 +0530 |
commit | 17fcce4ca5bf1418d8f335e869d328e1913d3f95 (patch) | |
tree | 18f5adee7cbcc938d4a1dd9b359659ca161c4661 /compiler/GHC/Iface/Recomp.hs | |
parent | 2972fd66f91cb51426a1df86b8166a067015e231 (diff) | |
download | haskell-wip/no-binary-char.tar.gz |
compiler: Remove instance Binary Charwip/no-binary-char
It is generally not a good idea to serialise strings as [Char] into interface files,
as upon deserialisation each of these would be turned into a highly memory inefficient
structure mostly composed of cons cells and pointers.
If you really want to serialise a Char, use the SerialisableChar newtype.
Diffstat (limited to 'compiler/GHC/Iface/Recomp.hs')
-rw-r--r-- | compiler/GHC/Iface/Recomp.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Iface/Recomp.hs b/compiler/GHC/Iface/Recomp.hs index 298e876595..afb1ef922c 100644 --- a/compiler/GHC/Iface/Recomp.hs +++ b/compiler/GHC/Iface/Recomp.hs @@ -777,7 +777,7 @@ checkModUsage fc UsageFile{ usg_file_path = file, else return UpToDate where reason = FileChanged $ unpackFS file - recomp = needsRecompileBecause $ fromMaybe reason $ fmap CustomReason mlabel + recomp = needsRecompileBecause $ fromMaybe reason $ fmap (CustomReason . unpackFS) mlabel handler = if debugIsOn then \e -> pprTrace "UsageFile" (text (show e)) $ return recomp else \_ -> return recomp -- if we can't find the file, just recompile, don't fail |