diff options
author | Adam Gundry <adam@well-typed.com> | 2014-11-11 11:25:50 +0000 |
---|---|---|
committer | Adam Gundry <adam@well-typed.com> | 2014-11-11 11:25:50 +0000 |
commit | be95bd9179ea073dae4376a6ac29130a4edc9e00 (patch) | |
tree | be93a73a9c4d617c37b08864cd64eba92f25d80e /compiler/main/Plugins.hs | |
parent | ce850aaba222c44d983cc13df21ca3365b2fdd19 (diff) | |
download | haskell-wip/tc-plugins.tar.gz |
Make TcPlugin part of Plugin so we can eliminate -ftc-pluginwip/tc-plugins
Diffstat (limited to 'compiler/main/Plugins.hs')
-rw-r--r-- | compiler/main/Plugins.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/main/Plugins.hs b/compiler/main/Plugins.hs index ccce5be60c..7e8ce5b41c 100644 --- a/compiler/main/Plugins.hs +++ b/compiler/main/Plugins.hs @@ -4,6 +4,7 @@ module Plugins ( ) where import CoreMonad ( CoreToDo, CoreM ) +import TcRnTypes ( TcPlugin ) -- | Command line options gathered from the -PModule.Name:stuff syntax are given to you as this type @@ -21,6 +22,8 @@ data Plugin = Plugin { -- This is called as the Core pipeline is built for every module -- being compiled, and plugins get the opportunity to modify -- the pipeline in a nondeterministic order. + , tcPlugin :: [CommandLineOption] -> Maybe TcPlugin + -- ^ A type-checker plugin (TODO document) } -- | Default plugin: does nothing at all! For compatability reasons you should base all your @@ -28,4 +31,5 @@ data Plugin = Plugin { defaultPlugin :: Plugin defaultPlugin = Plugin { installCoreToDos = const return + , tcPlugin = const Nothing } |