diff options
Diffstat (limited to 'compiler/main/Plugins.hs')
-rw-r--r-- | compiler/main/Plugins.hs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/main/Plugins.hs b/compiler/main/Plugins.hs index d936e288b4..6a8c761db8 100644 --- a/compiler/main/Plugins.hs +++ b/compiler/main/Plugins.hs @@ -1,10 +1,13 @@ module Plugins ( + FrontendPlugin(..), defaultFrontendPlugin, Plugin(..), CommandLineOption, defaultPlugin ) where import CoreMonad ( CoreToDo, CoreM ) import TcRnTypes ( TcPlugin ) +import GhcMonad +import DriverPhases -- | Command line options gathered from the -PModule.Name:stuff syntax @@ -36,3 +39,10 @@ defaultPlugin = Plugin { installCoreToDos = const return , tcPlugin = const Nothing } + +type FrontendPluginAction = [String] -> [(String, Maybe Phase)] -> Ghc () +data FrontendPlugin = FrontendPlugin { + frontend :: FrontendPluginAction + } +defaultFrontendPlugin :: FrontendPlugin +defaultFrontendPlugin = FrontendPlugin { frontend = \_ _ -> return () } |