summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/T11462_Plugin.hs
blob: 2c312257025a0c9a0f8cce5f1a42be80265eb220 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
module T11462_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 ()
  }