Commit 08b9bccd authored by batterseapower's avatar batterseapower
Browse files

Add another home-package-plugin test

parent fd129682
module HomePackagePlugin where
import GHCPlugins
import GhcPlugins
plugin :: Plugin
plugin = defaultPlugin {
......@@ -9,7 +9,7 @@ plugin = defaultPlugin {
install :: [CommandLineOption] -> [CoreToDo] -> CoreM [CoreToDo]
install _options todos = do
return $ (CoreDoPluginPass "String replacement" $ BindsToBindsPluginPass stringReplacementPass) : todos
return $ (CoreDoPluginPass "String replacement" $ bindsOnlyPass stringReplacementPass) : todos
stringReplacementPass :: [CoreBind] -> CoreM [CoreBind]
stringReplacementPass binds = return $ map replaceInBind binds
......
......@@ -9,7 +9,7 @@ test('plugins01', normal, run_command, ['$MAKE -s --no-print-directory plugins01
test('plugins02', normal, compile_fail, ['-package-conf simple-plugin/local.package.conf -fplugin Simple.BadlyTypedPlugin -package simple-plugin'])
test('plugins03', normal, compile_fail, ['-package-conf simple-plugin/local.package.conf -fplugin Simple.NonExistantPlugin -package simple-plugin'])
test('plugins04', extra_clean(['HomePackagePlugin.hi', 'HomePackagePlugin.o']), multimod_compile_and_run, ['plugins04', '-package ghc', '-fplugin HomePackagePlugin'])
test('plugins04', extra_clean(['HomePackagePlugin.hi', 'HomePackagePlugin.o']), multimod_compile_fail, ['plugins04', '-package ghc -fplugin HomePackagePlugin'])
test('plugins05', extra_clean(['HomePackagePlugin.hi', 'HomePackagePlugin.o']), multimod_compile_and_run, ['plugins05', '-package ghc'])
if default_testopts.cleanup != '':
......
Module imports form a cycle:
module `HomePackagePlugin' imports itself
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment