Correctly handle wired in unit IDs in -instantiated-with
ClosedPublic

Authored by ezyang on Mar 26 2017, 4:08 PM.

Details

Summary

To handle wired in packages, we must rewrite all occurrences
of unit ids like base-4.9.0.0 to base. However, I forgot
to do this on unit ids that occurred in unit identifiers
passed via -instantiated-with. This patch handles that case,
plus a test.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>

Test Plan

validate

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ezyang created this revision.Mar 26 2017, 4:08 PM
bgamari requested changes to this revision.Mar 27 2017, 7:58 AM

Lovely except for two small things.

compiler/main/Packages.hs
1084

Can we have a comment describing what these do. I would suggest something like,

-- Rewrite UnitIds of modules in wired-in packages to the form known to the compiler. For instance,
-- base-4.9.0.0 will be rewritten to just base, to match what appears in PrelNames.
testsuite/tests/backpack/cabal/bkpcabal07/Makefile
11

This needs to be updated.

This revision now requires changes to proceed.Mar 27 2017, 7:58 AM
This revision was automatically updated to reflect the committed changes.