diff options
author | Kavon Farvardin <kavon@farvard.in> | 2018-09-23 15:29:37 -0500 |
---|---|---|
committer | Kavon Farvardin <kavon@farvard.in> | 2018-09-23 15:29:37 -0500 |
commit | 84c2ad99582391005b5e873198b15e9e9eb4f78d (patch) | |
tree | caa8c2f2ec7e97fbb4977263c6817c9af5025cf4 /testsuite/tests/plugins/simple-plugin/Simple/Plugin.hs | |
parent | 8ddb47cfcf5776e9a3c55fd37947c8a95e00fa12 (diff) | |
parent | e68b439fe5de61b9a2ca51af472185c62ccb8b46 (diff) | |
download | haskell-wip/T13904.tar.gz |
update to current master againwip/T13904
Diffstat (limited to 'testsuite/tests/plugins/simple-plugin/Simple/Plugin.hs')
-rw-r--r-- | testsuite/tests/plugins/simple-plugin/Simple/Plugin.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/testsuite/tests/plugins/simple-plugin/Simple/Plugin.hs b/testsuite/tests/plugins/simple-plugin/Simple/Plugin.hs index e8c2435849..94cb74b151 100644 --- a/testsuite/tests/plugins/simple-plugin/Simple/Plugin.hs +++ b/testsuite/tests/plugins/simple-plugin/Simple/Plugin.hs @@ -16,14 +16,15 @@ import qualified Language.Haskell.TH as TH plugin :: Plugin plugin = defaultPlugin { - installCoreToDos = install + installCoreToDos = install, + pluginRecompile = purePlugin } 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 @@ -36,7 +37,7 @@ findNameBind target (NonRec b e) = findNameBndr target b findNameBind target (Rec bes) = mconcat (map (findNameBndr target . fst) bes) findNameBndr :: String -> CoreBndr -> First Name -findNameBndr target b +findNameBndr target b = if getOccString (varName b) == target then First (Just (varName b)) else First Nothing |