diff options
author | Boldizsar Nemeth <nboldi@elte.hu> | 2018-06-02 19:08:40 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-06-02 23:20:47 -0400 |
commit | c2783ccf545faabd21a234a4dfc569cd856082b9 (patch) | |
tree | 506fa03c577a381a4bb9c74e9f9749723b3928a3 /compiler/iface | |
parent | 727256680c8547282bda09dffefba01f9db98d1e (diff) | |
download | haskell-c2783ccf545faabd21a234a4dfc569cd856082b9.tar.gz |
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
Diffstat (limited to 'compiler/iface')
-rw-r--r-- | compiler/iface/LoadIface.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/iface/LoadIface.hs b/compiler/iface/LoadIface.hs index 02e7d50969..cc4a4241d5 100644 --- a/compiler/iface/LoadIface.hs +++ b/compiler/iface/LoadIface.hs @@ -77,6 +77,7 @@ import Hooks import FieldLabel import RnModIface import UniqDSet +import Plugins import Control.Monad import Control.Exception @@ -510,7 +511,9 @@ loadInterface doc_str mod from (length new_eps_insts) (length new_eps_rules) } - ; return (Succeeded final_iface) + ; -- invoke plugins + res <- withPlugins dflags interfaceLoadAction final_iface + ; return (Succeeded res) }}}} |