From d5f66b27b2cd7c36eb7c2e81b0cdca10c5a5ef90 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 24 Jan 2019 17:22:03 +0100 Subject: src: ByteString -> Text --- src/Reaktor/Plugins/System/Internal.hs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/Reaktor/Plugins/System/Internal.hs') diff --git a/src/Reaktor/Plugins/System/Internal.hs b/src/Reaktor/Plugins/System/Internal.hs index ac707ae..9b1b8de 100644 --- a/src/Reaktor/Plugins/System/Internal.hs +++ b/src/Reaktor/Plugins/System/Internal.hs @@ -18,6 +18,7 @@ instance FromJSON a => FromJSON (CaptureOr a) where -- TODO query means via direct privmsg and : data Activate = Always | Match | Query + deriving Show instance FromJSON Activate where parseJSON = \case @@ -28,8 +29,9 @@ instance FromJSON Activate where data Config = Config { cWorkDir :: Maybe FilePath - , cHooks :: HashMap ByteString [Hook] + , cHooks :: HashMap Text [Hook] } + deriving Show instance Default Config where def = Config Nothing mempty @@ -46,10 +48,11 @@ data Hook = Hook { hActivate :: Activate , hPattern :: Maybe ByteString , hCommand :: CaptureOr Command - , hArguments :: [CaptureOr ByteString] + , hArguments :: [CaptureOr Text] , hWorkDir :: Maybe FilePath - , hCommands :: HashMap ByteString Command + , hCommands :: HashMap Text Command } + deriving Show instance FromJSON Hook where parseJSON = \case -- cgit v1.2.3