diff options
author | Zubin Duggal <zubin.duggal@gmail.com> | 2023-05-04 05:52:13 +0530 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2023-05-16 14:00:00 -0400 |
commit | b70bc6900fcee7ff1e334bf8099283f610d6f9d4 (patch) | |
tree | 00b6c66159721fbedc9f59e12e3b61181937c584 /compiler/GHC/CoreToStg/Prep.hs | |
parent | 90e69d5d167b9d6cd63b04e42f8af375dc4b307f (diff) | |
download | haskell-b70bc6900fcee7ff1e334bf8099283f610d6f9d4.tar.gz |
compiler: Use compact representation/FastStrings for `SourceNote`s
`SourceNote`s should not be stored as [Char] as this is highly wasteful
and in certain scenarios can be highly duplicated.
Metric Decrease:
hard_hole_fits
Diffstat (limited to 'compiler/GHC/CoreToStg/Prep.hs')
-rw-r--r-- | compiler/GHC/CoreToStg/Prep.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/CoreToStg/Prep.hs b/compiler/GHC/CoreToStg/Prep.hs index d4f1fc52b3..48969e0dcb 100644 --- a/compiler/GHC/CoreToStg/Prep.hs +++ b/compiler/GHC/CoreToStg/Prep.hs @@ -314,7 +314,7 @@ mkDataConWorkers generate_debug_info mod_loc data_tycons | Just file <- ml_hs_file mod_loc = tick (span1 file) | otherwise = tick (span1 "???") where tick span = Tick $ SourceNote span $ - renderWithContext defaultSDocContext $ ppr name + LexicalFastString $ mkFastString $ renderWithContext defaultSDocContext $ ppr name span1 file = realSrcLocSpan $ mkRealSrcLoc (mkFastString file) 1 1 {- |