[commit: ghc] master: Implement TH addCorePlugin. (1755869)

git at git.haskell.org git at git.haskell.org
Fri Sep 22 00:13:26 UTC 2017


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/175586908963a6d438cf3c28922a38191f4eaa66/ghc

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

commit 175586908963a6d438cf3c28922a38191f4eaa66
Author: Facundo Domínguez <facundo.dominguez at tweag.io>
Date:   Thu Sep 21 18:04:56 2017 -0400

    Implement TH addCorePlugin.
    
    This allows template-haskell code to add plugins to the compilation
    pipeline. Otherwise, the user would have to pass -fplugin=... to ghc.
    
    For now, plugin modules in the current package can't be used. This is
    because when TH runs, it is too late to let GHC know that the plugin
    modules needed to be compiled first.
    
    Test Plan: ./validate
    
    Reviewers: simonpj, bgamari, austin, goldfire
    
    Reviewed By: bgamari
    
    Subscribers: angerman, rwbarton, mboes, thomie
    
    GHC Trac Issues: #13608
    
    Differential Revision: https://phabricator.haskell.org/D3821


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

175586908963a6d438cf3c28922a38191f4eaa66
 compiler/main/DynFlags.hs                          |  1 +
 compiler/main/GHC.hs                               | 11 +++++++----
 compiler/main/HscMain.hs                           | 22 +++++++++++++++-------
 compiler/typecheck/TcRnMonad.hs                    |  2 ++
 compiler/typecheck/TcRnTypes.hs                    |  3 +++
 compiler/typecheck/TcSplice.hs                     | 18 ++++++++++++++++++
 docs/users_guide/extending_ghc.rst                 | 12 ++++++++++++
 libraries/ghci/GHCi/Message.hs                     |  5 ++++-
 libraries/ghci/GHCi/TH.hs                          |  1 +
 .../template-haskell/Language/Haskell/TH/Syntax.hs | 14 ++++++++++++++
 testsuite/tests/plugins/Makefile                   |  5 +++++
 testsuite/tests/plugins/all.T                      |  5 +++++
 .../tests/plugins/{plugins01.hs => plugins08.hs}   |  9 ++++++---
 .../plugins/{plugins01.stderr => plugins08.stderr} |  2 +-
 .../plugins/{plugins01.stdout => plugins08.stdout} |  0
 15 files changed, 94 insertions(+), 16 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 175586908963a6d438cf3c28922a38191f4eaa66


More information about the ghc-commits mailing list