9189b38
Forwarded to https://ghc.haskell.org/trac/ghc/ticket/10424
9189b38
9189b38
--- a/compiler/iface/MkIface.hs
9189b38
+++ b/compiler/iface/MkIface.hs
9189b38
@@ -681,7 +681,7 @@ addFingerprints hsc_env mb_old_fingerpri
9189b38
    iface_hash <- computeFingerprint putNameLiterally
9189b38
                       (mod_hash,
9189b38
                        ann_fn (mkVarOcc "module"),  -- See mkIfaceAnnCache
9189b38
-                       mi_usages iface0,
9189b38
+                       usages,
9189b38
                        sorted_deps,
9189b38
                        mi_hpc iface0)
9189b38
 
9189b38
@@ -714,6 +714,9 @@ addFingerprints hsc_env mb_old_fingerpri
9189b38
     (non_orph_fis,   orph_fis)   = mkOrphMap ifFamInstOrph (mi_fam_insts iface0)
9189b38
     fix_fn = mi_fix_fn iface0
9189b38
     ann_fn = mkIfaceAnnCache (mi_anns iface0)
9189b38
+    -- Do not allow filenames to affect the interface
9189b38
+    usages = [ case u of UsageFile _ fp -> UsageFile "" fp; _ -> u | u <- mi_usages iface0 ]
9189b38
+
9189b38
 
9189b38
 -- | Retrieve the orphan hashes 'mi_orphan_hash' for a list of modules
9189b38
 -- (in particular, the orphan modules which are transitively imported by the