Extended the plugin system to run plugins on more representations
authorBoldizsar Nemeth <nboldi@elte.hu>
Sat, 2 Jun 2018 23:08:40 +0000 (19:08 -0400)
committerBen Gamari <ben@smart-cactus.org>
Sun, 3 Jun 2018 03:20:47 +0000 (23:20 -0400)
commitc2783ccf545faabd21a234a4dfc569cd856082b9
tree506fa03c577a381a4bb9c74e9f9749723b3928a3
parent727256680c8547282bda09dffefba01f9db98d1e
Extended the plugin system to run plugins on more representations

Extend GHC plugins to access parsed, type checked representation,
interfaces that are loaded. And splices that are evaluated. The goal is
to enable development tools to access the GHC representation in the
pre-existing build environment.

See the full proposal here:
https://ghc.haskell.org/trac/ghc/wiki/ExtendedPluginsProposal

Reviewers: goldfire, bgamari, ezyang, angerman, mpickering

Reviewed By: mpickering

Subscribers: ezyang, angerman, mpickering, ulysses4ever, rwbarton, thomie, carter

GHC Trac Issues: #14709

Differential Revision: https://phabricator.haskell.org/D4342
25 files changed:
compiler/iface/LoadIface.hs
compiler/main/HscMain.hs
compiler/main/Plugins.hs
compiler/simplCore/CoreMonad.hs-boot [new file with mode: 0644]
compiler/typecheck/TcSplice.hs
docs/users_guide/extending_ghc.rst
testsuite/tests/plugins/Makefile
testsuite/tests/plugins/MetaRemoveHelper.hs [new file with mode: 0644]
testsuite/tests/plugins/PluginFilteredExport.hs [new file with mode: 0644]
testsuite/tests/plugins/QuasiQuotation.hs [new file with mode: 0644]
testsuite/tests/plugins/all.T
testsuite/tests/plugins/plugins04.stderr
testsuite/tests/plugins/plugins09.hs [new file with mode: 0644]
testsuite/tests/plugins/plugins09.stdout [new file with mode: 0644]
testsuite/tests/plugins/plugins10.hs [new file with mode: 0644]
testsuite/tests/plugins/plugins10.stdout [new file with mode: 0644]
testsuite/tests/plugins/plugins11.hs [new file with mode: 0644]
testsuite/tests/plugins/plugins11.stdout [new file with mode: 0644]
testsuite/tests/plugins/plugins12.hs [new file with mode: 0644]
testsuite/tests/plugins/plugins13.hs [new file with mode: 0644]
testsuite/tests/plugins/plugins14.hs [new file with mode: 0644]
testsuite/tests/plugins/plugins15.hs [new file with mode: 0644]
testsuite/tests/plugins/simple-plugin/Simple/RemovePlugin.hs [new file with mode: 0644]
testsuite/tests/plugins/simple-plugin/Simple/SourcePlugin.hs [new file with mode: 0644]
testsuite/tests/plugins/simple-plugin/simple-plugin.cabal