Do not zero out version number when processing wired-in packages.
authorEdward Z. Yang <ezyang@cs.stanford.edu>
Fri, 22 Aug 2014 00:29:28 +0000 (01:29 +0100)
committerEdward Z. Yang <ezyang@cs.stanford.edu>
Fri, 22 Aug 2014 13:26:06 +0000 (14:26 +0100)
commit22520cd7071e624cb3cbde6fdd65e872855dd6ff
tree19f67f87f173c84020188f9cc98e77070be62a2c
parentbf1b117b6ab87a915bf24bcc85e216e5d51cb012
Do not zero out version number when processing wired-in packages.

Summary:
Previously, GHC would look for instances of wired-in packages in the
in-memory package database and null out the version number.  This was
necessary when the sourcePackageId was used to determine the linker
symbols; however, we now use a package key, so only that needs to be
updated.

Long-term, we can remove this hack by ensuring that Cabal actually records
the proper package key in the database.  This will also fix an unrelated
hack elsewhere.

Keeping version numbers means that wired in packages get rendered differently
when output by GHC.  This is the source of all the test-case output changes.

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

Reviewers: hvr, austin

Subscribers: simonmar, ezyang, carter

Differential Revision: https://phabricator.haskell.org/D170
27 files changed:
compiler/main/Packages.lhs
testsuite/tests/ghci/scripts/ghci025.stdout
testsuite/tests/indexed-types/should_compile/T3017.stderr
testsuite/tests/indexed-types/should_fail/T9160.stderr
testsuite/tests/package/package06e.stderr
testsuite/tests/package/package07e.stderr
testsuite/tests/package/package08e.stderr
testsuite/tests/roles/should_compile/Roles1.stderr
testsuite/tests/roles/should_compile/Roles14.stderr
testsuite/tests/roles/should_compile/Roles2.stderr
testsuite/tests/roles/should_compile/Roles3.stderr
testsuite/tests/roles/should_compile/Roles4.stderr
testsuite/tests/roles/should_compile/T8958.stderr
testsuite/tests/safeHaskell/check/Check01.stderr
testsuite/tests/safeHaskell/check/Check06.stderr
testsuite/tests/safeHaskell/check/Check08.stderr
testsuite/tests/safeHaskell/check/Check09.stderr
testsuite/tests/safeHaskell/check/pkg01/ImpSafe01.stderr
testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly07.stderr
testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly08.stderr
testsuite/tests/safeHaskell/check/pkg01/safePkg01.stdout
testsuite/tests/safeHaskell/flags/SafeFlags17.stderr
testsuite/tests/simplCore/should_compile/T5550.stderr
testsuite/tests/th/TH_Roles2.stderr
testsuite/tests/typecheck/should_compile/tc231.stderr
testsuite/tests/typecheck/should_fail/T5095.stderr
testsuite/tests/typecheck/should_fail/tcfail182.stderr