summaryrefslogtreecommitdiff
path: root/compiler/GHC/Iface/Ext
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-09-12 15:29:20 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-10-11 12:50:40 -0400
commit7f0decd5063a853fc8f38a8944b2c91995cd5e48 (patch)
tree01c5fa5c5d8d0f3f7cf1e2ba0a24bb19c7feec5a /compiler/GHC/Iface/Ext
parent66af1399963a1872e520d1dbd1c94fd43e65082d (diff)
downloadhaskell-7f0decd5063a853fc8f38a8944b2c91995cd5e48.tar.gz
Don't include BufPos in interface files
Ticket #22162 pointed out that the build directory was leaking into the ABI hash of a module because the BufPos depended on the location of the build tree. BufPos is only used in GHC.Parser.PostProcess.Haddock, and the information doesn't need to be propagated outside the context of a module. Fixes #22162
Diffstat (limited to 'compiler/GHC/Iface/Ext')
-rw-r--r--compiler/GHC/Iface/Ext/Types.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/Iface/Ext/Types.hs b/compiler/GHC/Iface/Ext/Types.hs
index 08412349d2..4aefc4d23c 100644
--- a/compiler/GHC/Iface/Ext/Types.hs
+++ b/compiler/GHC/Iface/Ext/Types.hs
@@ -781,5 +781,5 @@ toHieName name
| isKnownKeyName name = KnownKeyName (nameUnique name)
| isExternalName name = ExternalName (nameModule name)
(nameOccName name)
- (nameSrcSpan name)
- | otherwise = LocalName (nameOccName name) (nameSrcSpan name)
+ (removeBufSpan $ nameSrcSpan name)
+ | otherwise = LocalName (nameOccName name) (removeBufSpan $ nameSrcSpan name)