Backpack shadowing of same-named signatures necessitates different home units for signatures in different home units in bkp files
Motivation
Because backpack currently does not differentiate between modules with the same name in the same bkp file, trying to add features that load interface files during the processing of backpack (e.g. !10283 (closed)) introduces aliasing issues in some cases.
For example, in test bkp44
trying to load signature p:B
when q:A
has been merged, it causes the type checking of p:B
to try to import q:A
instead of p:A
, which in turn causes an error where A.T
was not found in A
(because q:A
restricts the imports of p:A
)
Proposal
Like with GHCi, make bkp signatures from different units be cached in different home units, which will remove the aliasing issue. In that case, also remove the workaround for export deprecations in signature merging where the ImpSpec module is set to a hole module instead of the actual source signature