Fix recompilation avoidance bug for implementor of hsig.
authorEdward Z. Yang <ezyang@cs.stanford.edu>
Sun, 26 Mar 2017 05:50:55 +0000 (22:50 -0700)
committerEdward Z. Yang <ezyang@cs.stanford.edu>
Sun, 2 Apr 2017 23:39:40 +0000 (16:39 -0700)
commit5fb485a3e1e83a1f5c6acf989be292940229e1a4
tree755ff931bfe2fc94d5985464d1a623b4c8ab06d0
parentd4e8ebcd04cc210bd15a1fd7677558e8b04b3da8
Fix recompilation avoidance bug for implementor of hsig.

Summary:
I observed a bug where if I modified the module which implemented
an hsig in another package, GHC would not recompile the signature
in this situation.

The root cause was that we were conflating modules from user
imports, and "system" module dependencies (from signature
merging and instantiation.) So this patch handles them separately.

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

Reviewers: simonpj, bgamari, austin

Subscribers: rwbarton, thomie, snowleopard

Differential Revision: https://phabricator.haskell.org/D3381
17 files changed:
compiler/deSugar/DsUsage.hs
compiler/iface/MkIface.hs
compiler/main/HscMain.hs
compiler/main/HscTypes.hs
compiler/rename/RnEnv.hs
compiler/rename/RnNames.hs
compiler/typecheck/TcBackpack.hs
compiler/typecheck/TcRnExports.hs
testsuite/tests/backpack/cabal/bkpcabal06/.gitignore [new file with mode: 0644]
testsuite/tests/backpack/cabal/bkpcabal06/Makefile [new file with mode: 0644]
testsuite/tests/backpack/cabal/bkpcabal06/Setup.hs [new file with mode: 0644]
testsuite/tests/backpack/cabal/bkpcabal06/all.T [new file with mode: 0644]
testsuite/tests/backpack/cabal/bkpcabal06/bkpcabal06.cabal [new file with mode: 0644]
testsuite/tests/backpack/cabal/bkpcabal06/bkpcabal06.stderr [new file with mode: 0644]
testsuite/tests/backpack/cabal/bkpcabal06/impl/P.hs.in1 [new file with mode: 0644]
testsuite/tests/backpack/cabal/bkpcabal06/impl/P.hs.in2 [new file with mode: 0644]
testsuite/tests/backpack/cabal/bkpcabal06/sig/P.hsig [new file with mode: 0644]