buildpath-abi-stability
authorDebian Haskell Group <pkg-haskell-maintainers@lists.alioth.debian.org>
Mon, 17 Feb 2025 08:44:23 +0000 (09:44 +0100)
committerGianfranco Costamagna <locutusofborg@debian.org>
Mon, 17 Feb 2025 08:44:23 +0000 (09:44 +0100)
Forwarded to https://ghc.haskell.org/trac/ghc/ticket/10424

Forwarded to https://ghc.haskell.org/trac/ghc/ticket/10424

Gbp-Pq: Name buildpath-abi-stability.patch

compiler/GHC/Iface/Recomp.hs

index 0f8748e5361cab0244aab0c7fec1db57a78110ad..89918f448fe43ccd20a9f6c9e3b9f31b0717b38c 100644 (file)
@@ -1247,7 +1247,7 @@ addFingerprints hsc_env iface0
                       (mod_hash,
                        mi_src_hash iface0,
                        ann_fn (mkVarOccFS (fsLit "module")),  -- See mkIfaceAnnCache
-                       mi_usages iface0,
+                       usages,
                        sorted_deps,
                        mi_hpc iface0)
 
@@ -1282,6 +1282,8 @@ addFingerprints hsc_env iface0
     (non_orph_rules, orph_rules) = mkOrphMap ifRuleOrph    (mi_rules iface0)
     (non_orph_fis,   orph_fis)   = mkOrphMap ifFamInstOrph (mi_fam_insts iface0)
     ann_fn = mkIfaceAnnCache (mi_anns iface0)
+    -- Do not allow filenames to affect the interface
+    usages = [ case u of UsageFile _ fp fl -> UsageFile "" fp fl; _ -> u | u <- mi_usages iface0 ]
 
 -- | Retrieve the orphan hashes 'mi_orphan_hash' for a list of modules
 -- (in particular, the orphan modules which are transitively imported by the