From 34bf6e470f498bb0cfa97c91e55221a67e06f2f1 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Wed, 2 Aug 2017 22:15:50 +0200 Subject: Plugin.hs(performPlugin): Use `PluginAction` type Instead of manually writing out the type of the action function returned from `performPlugin`, use the consolidated `PluginAction` type. This makes it easier for us to change the `PluginAction` type signature if necessary. --- src/Plugin.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/Plugin.hs b/src/Plugin.hs index d6598ec..73df169 100644 --- a/src/Plugin.hs +++ b/src/Plugin.hs @@ -23,7 +23,7 @@ matchPlugins message plugins = [p | p <- plugins, M.text message =~ matchRegex p] -- | Run the action belonging to the plugin, stored in its `perform` field. -performPlugin :: Plugin -> M.Message -> String +performPlugin :: Plugin -> PluginAction performPlugin p message = perform p $ message -- | The list of plugins to load -- cgit v1.2.3