summaryrefslogtreecommitdiff
path: root/compiler/main/Plugins.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/main/Plugins.hs')
-rw-r--r--compiler/main/Plugins.hs36
1 files changed, 32 insertions, 4 deletions
diff --git a/compiler/main/Plugins.hs b/compiler/main/Plugins.hs
index 01a9841119..430b0790f9 100644
--- a/compiler/main/Plugins.hs
+++ b/compiler/main/Plugins.hs
@@ -1,11 +1,39 @@
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE CPP #-}
module Plugins (
- FrontendPlugin(..), defaultFrontendPlugin, FrontendPluginAction
- , Plugin(..), CommandLineOption, LoadedPlugin(..), lpModuleName
- , defaultPlugin, keepRenamedSource, withPlugins, withPlugins_
- , PluginRecompile(..)
+ -- * Plugins
+ Plugin(..)
+ , defaultPlugin
+ , CommandLineOption
+ -- ** Recompilation checking
, purePlugin, impurePlugin, flagRecompile
+ , PluginRecompile(..)
+
+ -- * Plugin types
+ -- ** Frontend plugins
+ , FrontendPlugin(..), defaultFrontendPlugin, FrontendPluginAction
+ -- ** Core plugins
+ -- | Core plugins allow plugins to register as a Core-to-Core pass.
+ , CorePlugin
+ -- ** Typechecker plugins
+ -- | Typechecker plugins allow plugins to provide evidence to the
+ -- typechecker.
+ , TcPlugin
+ -- ** Source plugins
+ -- | GHC offers a number of points where plugins can access and modify its
+ -- front-end (\"source\") representation. These include:
+ --
+ -- - access to the parser result with 'parsedResultAction'
+ -- - access to the renamed AST with 'renamedResultAction'
+ -- - access to the typechecked AST with 'typeCheckResultAction'
+ -- - access to the Template Haskell splices with 'spliceRunAction'
+ -- - access to loaded interface files with 'interfaceLoadAction'
+ --
+ , keepRenamedSource
+
+ -- * Internal
+ , LoadedPlugin(..), lpModuleName
+ , withPlugins, withPlugins_
) where
import GhcPrelude