summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/T11525_Plugin.hs
blob: e68ddbc0dc2128ccfbc418e73d26b24f42e1fbda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
module T11525_Plugin(plugin) where

import GHC.Tc.Utils.Monad ( TcPlugin(..), TcPluginSolveResult(..), TcPluginRewriteResult(..) )
import GHC.Driver.Plugins ( defaultPlugin, Plugin(..), CommandLineOption )
import GHC.Types.Unique.FM ( emptyUFM )

plugin :: Plugin
plugin = defaultPlugin { tcPlugin = Just . thePlugin }

thePlugin :: [CommandLineOption] -> TcPlugin
thePlugin opts = TcPlugin
  { tcPluginInit    = return ()
  , tcPluginSolve   = \_ _ _ _ -> return $ TcPluginOk [] []
  , tcPluginRewrite = \_ -> emptyUFM
  , tcPluginStop    = \_ -> return ()
  }