Setup tcg_imports earlier during signature matching, so orphans are visible.
authorEdward Z. Yang <ezyang@cs.stanford.edu>
Thu, 8 Dec 2016 06:57:09 +0000 (22:57 -0800)
committerEdward Z. Yang <ezyang@cs.stanford.edu>
Thu, 8 Dec 2016 23:03:17 +0000 (15:03 -0800)
commit62332f36b62431ddb9ab3c97365288c7d3fc2d39
treed4c33ac3312724a224b50206d4de5daad50e297b
parentc5fbbac9fdf86a94b636849e4aa6f1c4ecc9acf2
Setup tcg_imports earlier during signature matching, so orphans are visible.

Summary:
Previously, we updated tcg_imports after doing all of the
actual matching, which was fine for outputting the interface,
but not good enough for checking if all type classes were
implemented; we weren't treating orphans as visible (when
they needed to be.)

Fixes #12945.

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

Reviewers: simonpj, austin, bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2802

GHC Trac Issues: #12945
compiler/typecheck/TcBackpack.hs
testsuite/tests/backpack/should_compile/all.T
testsuite/tests/backpack/should_compile/bkp41.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp41.stderr [new file with mode: 0644]