[commit: ghc] ghc-8.0: Have addModFinalizer expose the local type environment. (8d63419)

git at git.haskell.org git at git.haskell.org
Tue Aug 30 21:44:03 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-8.0
Link       : http://ghc.haskell.org/trac/ghc/changeset/8d63419478074728eb03082787ea51d498b3e62e/ghc

>---------------------------------------------------------------

commit 8d63419478074728eb03082787ea51d498b3e62e
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
    
    (cherry picked from commit 567dbd9bcb602accf3184b83050f2982cbb7758b)


>---------------------------------------------------------------

8d63419478074728eb03082787ea51d498b3e62e
 compiler/deSugar/DsMeta.hs                         |   1 +
 compiler/hsSyn/HsExpr.hs                           |  58 ++++++++-
 compiler/rename/RnPat.hs                           |   4 +
 compiler/rename/RnSplice.hs                        | 137 +++++++++++++++++++--
 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                     |  99 +++++++++++----
 compiler/typecheck/TcSplice.hs-boot                |   3 +-
 iserv/src/Main.hs                                  |   2 +-
 libraries/ghci/GHCi/Message.hs                     |  20 +--
 libraries/ghci/GHCi/TH.hs                          |  35 +++---
 .../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, 433 insertions(+), 74 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 8d63419478074728eb03082787ea51d498b3e62e


More information about the ghc-commits mailing list