[commit: ghc] master: Improvements/bugfixes to signature reexport handling. (fd2d5b6)
git at git.haskell.org
git at git.haskell.org
Sat Feb 18 00:47:58 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/fd2d5b6de7493c2ff2ac76401ef296f575c52483/ghc
>---------------------------------------------------------------
commit fd2d5b6de7493c2ff2ac76401ef296f575c52483
Author: Edward Z. Yang <ezyang at cs.stanford.edu>
Date: Sun Feb 12 16:02:44 2017 -0800
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 at cs.stanford.edu>
Test Plan: validate
Reviewers: bgamari, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D3133
>---------------------------------------------------------------
fd2d5b6de7493c2ff2ac76401ef296f575c52483
compiler/main/HscMain.hs | 2 +-
compiler/typecheck/TcBackpack.hs | 43 +++++++++---
docs/users_guide/separate_compilation.rst | 82 +++++++++++++---------
.../backpack/cabal/bkpcabal02/bkpcabal02.stderr | 4 +-
testsuite/tests/backpack/reexport/all.T | 4 ++
testsuite/tests/backpack/reexport/bkpreex07.bkp | 3 +
testsuite/tests/backpack/reexport/bkpreex07.stderr | 2 +
testsuite/tests/backpack/reexport/bkpreex08.bkp | 17 +++++
testsuite/tests/backpack/reexport/bkpreex08.stderr | 8 +++
testsuite/tests/backpack/reexport/bkpreex09.bkp | 10 +++
.../bkp07.stderr => reexport/bkpreex09.stderr} | 2 +-
testsuite/tests/backpack/reexport/bkpreex10.bkp | 10 +++
.../bkp07.stderr => reexport/bkpreex10.stderr} | 2 +-
.../tests/backpack/should_fail/bkpfail04.stderr | 4 +-
.../tests/backpack/should_fail/bkpfail42.stderr | 4 +-
15 files changed, 148 insertions(+), 49 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc fd2d5b6de7493c2ff2ac76401ef296f575c52483
More information about the ghc-commits
mailing list