diff options
author | Teddy Wing | 2017-08-02 22:15:50 +0200 |
---|---|---|
committer | Teddy Wing | 2017-08-02 22:15:50 +0200 |
commit | 34bf6e470f498bb0cfa97c91e55221a67e06f2f1 (patch) | |
tree | 0370db1a8754a5b251b60a13812e6573179b600d | |
parent | 762df21ff369fa4ddf7409c62181802c47d4214b (diff) | |
download | sorbot-34bf6e470f498bb0cfa97c91e55221a67e06f2f1.tar.bz2 |
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.
-rw-r--r-- | src/Plugin.hs | 2 |
1 files changed, 1 insertions, 1 deletions
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 |