diff options
Diffstat (limited to 'src/Plugin/Base.hs')
-rw-r--r-- | src/Plugin/Base.hs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/Plugin/Base.hs b/src/Plugin/Base.hs index ac67e71..d4194ee 100644 --- a/src/Plugin/Base.hs +++ b/src/Plugin/Base.hs @@ -1,7 +1,10 @@ +{-# LANGUAGE OverloadedStrings #-} + module Plugin.Base ( PluginAction , Plugin(..) + , defaultPlugin ) where import qualified Data.Text as T @@ -17,7 +20,17 @@ data Plugin = Plugin , perform :: PluginAction , command :: T.Text , description :: T.Text + , queryOnly :: Bool } instance Show Plugin where - show (Plugin r _ _ _) = "matchRegex = " ++ r + show (Plugin r _ _ _ _) = "matchRegex = " ++ r + +defaultPlugin :: Plugin +defaultPlugin = Plugin + { matchRegex = "" + , perform = \m -> return (Left "") + , command = "" + , description = "" + , queryOnly = False + } |