blob: ce4f8240c807fdfcbcc3340eca73f3f524233350 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
{-# LANGUAGE CPP #-}
module Common where
import GhcPlugins
install :: [CommandLineOption] -> [CoreToDo] -> CoreM [CoreToDo]
install options todos = do
putMsgS $ "Simple Plugin Passes Queried"
putMsgS $ "Got options: " ++ unwords options
-- Create some actual passes to continue the test.
return $ CoreDoPluginPass "Main pass" mainPass
: todos
mainPass :: ModGuts -> CoreM ModGuts
mainPass guts = do
#if defined(RUN2)
putMsgS "Simple Plugin Pass Run 2"
#else
putMsgS "Simple Plugin Pass Run"
#endif
return guts
|