Sanity check if we pick up an hsig file without -instantiated-with.
authorEdward Z. Yang <ezyang@cs.stanford.edu>
Fri, 9 Dec 2016 03:32:37 +0000 (19:32 -0800)
committerEdward Z. Yang <ezyang@cs.stanford.edu>
Tue, 13 Dec 2016 07:09:55 +0000 (23:09 -0800)
commit24f6bec94411aa6c39a2c94ce5154ffe96ae330f
tree594b5f74d9889751abc5e959109e78c2fd789eb3
parent8f6d241a74efa6f6280689a9b14c36c6a9f4c231
Sanity check if we pick up an hsig file without -instantiated-with.

Summary:
Previously we would just let compilation proceed along until
we tried to pull up the Module for the hsig file, and get
main:A instead of <A>, and get a mysterious error.  Check
for this earlier!

Fixes #12955.

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/D2815

GHC Trac Issues: #12955
compiler/basicTypes/Module.hs
compiler/main/GhcMake.hs
testsuite/tests/backpack/reexport/bkpreex02.stderr
testsuite/tests/backpack/should_compile/bkp24.stderr
testsuite/tests/backpack/should_fail/bkpfail14.stderr
testsuite/tests/backpack/should_fail/bkpfail15.stderr
testsuite/tests/driver/Makefile
testsuite/tests/driver/T12955.hsig [new file with mode: 0644]
testsuite/tests/driver/T12955.stderr [new file with mode: 0644]
testsuite/tests/driver/all.T