Implement TH addCorePlugin.
authorFacundo Domínguez <facundo.dominguez@tweag.io>
Thu, 21 Sep 2017 22:04:56 +0000 (18:04 -0400)
committerBen Gamari <ben@smart-cactus.org>
Fri, 22 Sep 2017 00:13:04 +0000 (20:13 -0400)
commit175586908963a6d438cf3c28922a38191f4eaa66
treec481ea2193d5b15aba917e201869ba0772510dec
parenta9d417dab21e0b677f13c2ba99244162a8fffe3e
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
15 files changed:
compiler/main/DynFlags.hs
compiler/main/GHC.hs
compiler/main/HscMain.hs
compiler/typecheck/TcRnMonad.hs
compiler/typecheck/TcRnTypes.hs
compiler/typecheck/TcSplice.hs
docs/users_guide/extending_ghc.rst
libraries/ghci/GHCi/Message.hs
libraries/ghci/GHCi/TH.hs
libraries/template-haskell/Language/Haskell/TH/Syntax.hs
testsuite/tests/plugins/Makefile
testsuite/tests/plugins/all.T
testsuite/tests/plugins/plugins08.hs [new file with mode: 0644]
testsuite/tests/plugins/plugins08.stderr [new file with mode: 0644]
testsuite/tests/plugins/plugins08.stdout [new file with mode: 0644]