diff options
author | Edward Z. Yang <ezyang@cs.stanford.edu> | 2017-02-12 16:02:44 -0800 |
---|---|---|
committer | Edward Z. Yang <ezyang@cs.stanford.edu> | 2017-02-17 13:51:19 -0800 |
commit | fd2d5b6de7493c2ff2ac76401ef296f575c52483 (patch) | |
tree | 44142c3ac7e641a1bf7980001136369394245a8a /testsuite/tests/backpack/should_fail | |
parent | 22dba98f2b22141d8238d7e7a42141495945f1cf (diff) | |
download | haskell-fd2d5b6de7493c2ff2ac76401ef296f575c52483.tar.gz |
Improvements/bugfixes to signature reexport handling.
Summary:
A number of changes:
- Keep the TcGblEnv from typechecking the local signature
around when we do merging. In particular, we setup
tcg_imports and tcg_rdr_env according to the local
signature. This improves our error output (for example,
see bkpfail04) and also fixes a bug with reexporting
modules in signatures (see bkpreex07)
- Fix a bug in thinning, where if we had signature A(module A),
this previously would have *thinned out* all of the inherited
signatures. Now we treat every inherited signature as having
come from an import like "import A", so a module A reexport
will pick them up.
- Recompilation checking now keeps track of dependent source files
of the source signature; previously we forgot to retain this
info.
There's a manual update too.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: bgamari, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D3133
Diffstat (limited to 'testsuite/tests/backpack/should_fail')
-rw-r--r-- | testsuite/tests/backpack/should_fail/bkpfail04.stderr | 4 | ||||
-rw-r--r-- | testsuite/tests/backpack/should_fail/bkpfail42.stderr | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/testsuite/tests/backpack/should_fail/bkpfail04.stderr b/testsuite/tests/backpack/should_fail/bkpfail04.stderr index f445c57f8e..07159cf277 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail04.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail04.stderr @@ -8,8 +8,8 @@ bkpfail04.bkp:7:9: error: • Type constructor ‘A’ has conflicting definitions in the module and its hsig file - Main module: data A = A {foo :: GHC.Types.Int} - Hsig file: data A = A {bar :: GHC.Types.Bool} + Main module: data A = A {foo :: Int} + Hsig file: data A = A {bar :: Bool} The constructors do not match: The record label lists for ‘A’ differ The types for ‘A’ differ diff --git a/testsuite/tests/backpack/should_fail/bkpfail42.stderr b/testsuite/tests/backpack/should_fail/bkpfail42.stderr index 30b43d829e..5a9e1aa9c3 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail42.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail42.stderr @@ -7,9 +7,9 @@ bkpfail42.bkp:9:9: error: • Type constructor ‘F’ has conflicting definitions in the module and its hsig file Main module: type family F a :: * - where [a] F a = GHC.Types.Int + where [a] F a = Int Hsig file: type family F a :: * - where [a] F a = GHC.Types.Bool + where [a] F a = Bool • while merging the signatures from: • p[A=<A>]:A • ...and the local signature for A |