aboutsummaryrefslogtreecommitdiffstats
path: root/src/PluginList.hs
AgeCommit message (Collapse)Author
2017-09-14Add `Bot` to rest of pluginsTeddy Wing
Add our `Bot` monad to the rest of the plugins: * Factorial * GitRemoteSetOrigin * Help The only problem is with the Help plugin. Still trying to figure out how to set up my list comprehension so that it works with the `Bot`-wrapped `Plugin` list.
2017-08-20Use explicit imports when importing pluginsTeddy Wing
Going for readability in explicitness.
2017-08-20Add Factorial pluginTeddy Wing
This plugin calculates factorials. It's not super optimised, but works for small inputs. Adds the 'text-show' plugin to convert the resulting integer to a `Data.Text` to be returned by the plugin action. At first I had tried /^\d+!$/ for the regex match, but that produced this error: sorbot/src/Plugin/Factorial.hs:14:24: error: lexical error in string/character literal at character 'd' Tried to fix that by using /^\\d+!$/, but that didn't match anything. Then tried a long-form character class, /^[:digit:]+!$/, which TDFA implies it supports, but a quick look at the code seems to indicate that those parts were removed or commented out. Not sure what was going on with that. So instead went for the remaining solution, a `0-9` character class.
2017-08-20Move `PluginList` out of `Plugin` directoryTeddy Wing
Asking for `Plugin.Plugin...` is redundant. Take this module out of the `Plugin` directory to eliminate the repetition in naming.