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/Iface | |
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/Iface')
-rw-r--r-- | compiler/GHC/Iface/Syntax.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/GHC/Iface/Syntax.hs b/compiler/GHC/Iface/Syntax.hs index 84603e9399..e48678ec80 100644 --- a/compiler/GHC/Iface/Syntax.hs +++ b/compiler/GHC/Iface/Syntax.hs @@ -45,6 +45,7 @@ module GHC.Iface.Syntax ( import GHC.Prelude +import GHC.Data.FastString import GHC.Builtin.Names ( unrestrictedFunTyConKey, liftedTypeKindTyConKey, constraintKindTyConKey ) import GHC.Types.Unique ( hasKey ) @@ -577,7 +578,7 @@ data IfaceExpr data IfaceTickish = IfaceHpcTick Module Int -- from HpcTick x | IfaceSCC CostCentre Bool Bool -- from ProfNote - | IfaceSource RealSrcSpan String -- from SourceNote + | IfaceSource RealSrcSpan FastString -- from SourceNote -- no breakpoints: we never export these into interface files data IfaceAlt = IfaceAlt IfaceConAlt [IfLclName] IfaceExpr |