[commit: ghc] master: Have addModFinalizer expose the local type environment. (567dbd9)
git at git.haskell.org
git at git.haskell.org
Wed Jul 6 09:46:25 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/567dbd9bcb602accf3184b83050f2982cbb7758b/ghc
>---------------------------------------------------------------
commit 567dbd9bcb602accf3184b83050f2982cbb7758b
Author: Facundo DomÃnguez <facundo.dominguez at tweag.io>
Date: Wed Jul 6 06:48:27 2016 -0300
Have addModFinalizer expose the local type environment.
Summary:
This annotates the splice point with 'HsSpliced ref e' where 'e' is the
result of the splice. 'ref' is a reference that the typechecker will fill with
the local type environment.
The finalizer then reads the ref and uses the local type environment, which
causes 'reify' to find local variables when run in the finalizer.
Test Plan: ./validate
Reviewers: simonpj, simonmar, bgamari, austin, goldfire
Reviewed By: goldfire
Subscribers: simonmar, thomie, mboes
Differential Revision: https://phabricator.haskell.org/D2286
GHC Trac Issues: #11832
>---------------------------------------------------------------
567dbd9bcb602accf3184b83050f2982cbb7758b
compiler/deSugar/DsMeta.hs | 1 +
compiler/hsSyn/HsExpr.hs | 55 +++++++++
compiler/rename/RnPat.hs | 4 +
compiler/rename/RnSplice.hs | 135 +++++++++++++++++++--
compiler/rename/RnTypes.hs | 1 +
compiler/typecheck/TcExpr.hs | 8 ++
compiler/typecheck/TcHsType.hs | 12 ++
compiler/typecheck/TcPat.hs | 9 ++
compiler/typecheck/TcRnMonad.hs | 17 +++
compiler/typecheck/TcRnTypes.hs | 55 +++++++--
compiler/typecheck/TcSplice.hs | 100 +++++++++++----
compiler/typecheck/TcSplice.hs-boot | 3 +-
iserv/src/Main.hs | 2 +-
libraries/ghci/GHCi/Message.hs | 18 +--
libraries/ghci/GHCi/TH.hs | 36 +++---
.../template-haskell/Language/Haskell/TH/Syntax.hs | 4 +
testsuite/tests/th/TH_reifyLocalDefs.hs | 36 ++++++
testsuite/tests/th/TH_reifyLocalDefs.stderr | 5 +
testsuite/tests/th/all.T | 1 +
19 files changed, 429 insertions(+), 73 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 567dbd9bcb602accf3184b83050f2982cbb7758b
More information about the ghc-commits
mailing list