summaryrefslogtreecommitdiffstats
path: root/src/Reaktor
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2019-01-21 19:14:55 +0100
committertv <tv@krebsco.de>2019-01-21 19:19:05 +0100
commit2842e05c232505c670daee0fffb9a34d5c866217 (patch)
tree90ffcdea7130b5811b6e02f931c5b1cc27a3191f /src/Reaktor
parentce276eee82ec0b8c4106beb4c51d6f9eb77335c4 (diff)
src: add Data.ByteString.Char8.Extended
Diffstat (limited to 'src/Reaktor')
-rw-r--r--src/Reaktor/Message.hs2
-rw-r--r--src/Reaktor/Parser.hs2
-rw-r--r--src/Reaktor/Plugins/Mention.hs2
-rw-r--r--src/Reaktor/Plugins/NickServ.hs2
-rw-r--r--src/Reaktor/Plugins/Register.hs2
-rw-r--r--src/Reaktor/Plugins/System.hs2
-rw-r--r--src/Reaktor/Plugins/System/Types.hs2
-rw-r--r--src/Reaktor/Types.hs12
-rw-r--r--src/Reaktor/Utils.hs2
9 files changed, 9 insertions, 19 deletions
diff --git a/src/Reaktor/Message.hs b/src/Reaktor/Message.hs
index f929471..c1c7ced 100644
--- a/src/Reaktor/Message.hs
+++ b/src/Reaktor/Message.hs
@@ -1,7 +1,7 @@
{-# LANGUAGE OverloadedStrings #-}
module Reaktor.Message where
-import qualified Data.ByteString.Char8 as BS
+import qualified Data.ByteString.Char8.Extended as BS
import Reaktor.Types
diff --git a/src/Reaktor/Parser.hs b/src/Reaktor/Parser.hs
index bdd2f98..3baaad7 100644
--- a/src/Reaktor/Parser.hs
+++ b/src/Reaktor/Parser.hs
@@ -3,7 +3,7 @@ module Reaktor.Parser where
import Control.Applicative
import Data.Attoparsec.ByteString.Char8
-import qualified Data.ByteString.Char8 as BS
+import qualified Data.ByteString.Char8.Extended as BS
import qualified Data.Char
import Reaktor.Types
diff --git a/src/Reaktor/Plugins/Mention.hs b/src/Reaktor/Plugins/Mention.hs
index 0c86d74..a08604c 100644
--- a/src/Reaktor/Plugins/Mention.hs
+++ b/src/Reaktor/Plugins/Mention.hs
@@ -4,7 +4,7 @@ module Reaktor.Plugins.Mention (plugin) where
import Control.Monad (when)
import Data.Aeson
-import qualified Data.ByteString.Char8 as BS
+import qualified Data.ByteString.Char8.Extended as BS
import qualified Data.Char
import Reaktor.Message
import Reaktor.Types
diff --git a/src/Reaktor/Plugins/NickServ.hs b/src/Reaktor/Plugins/NickServ.hs
index 3987774..caa2301 100644
--- a/src/Reaktor/Plugins/NickServ.hs
+++ b/src/Reaktor/Plugins/NickServ.hs
@@ -7,7 +7,7 @@ module Reaktor.Plugins.NickServ (plugin) where
import Control.Monad (when)
import Data.Aeson
import Data.Aeson.Types (parseEither)
-import qualified Data.ByteString.Char8 as BS
+import qualified Data.ByteString.Char8.Extended as BS
import GHC.Generics
import Reaktor.Message
import Reaktor.Types
diff --git a/src/Reaktor/Plugins/Register.hs b/src/Reaktor/Plugins/Register.hs
index fd17f48..48c3ff2 100644
--- a/src/Reaktor/Plugins/Register.hs
+++ b/src/Reaktor/Plugins/Register.hs
@@ -6,7 +6,7 @@ module Reaktor.Plugins.Register (plugin) where
import Control.Monad (when)
import Data.Aeson
-import qualified Data.ByteString.Char8 as BS
+import qualified Data.ByteString.Char8.Extended as BS
import GHC.Generics
import Reaktor.Types
import Reaktor.Utils (nextNick,randomNick)
diff --git a/src/Reaktor/Plugins/System.hs b/src/Reaktor/Plugins/System.hs
index c8d40be..4e659d1 100644
--- a/src/Reaktor/Plugins/System.hs
+++ b/src/Reaktor/Plugins/System.hs
@@ -9,7 +9,7 @@ import Control.Applicative
import Control.Concurrent (forkIO)
import Control.Exception (finally)
import Data.Aeson
-import qualified Data.ByteString.Char8 as BS
+import qualified Data.ByteString.Char8.Extended as BS
import qualified Data.Map as M
import Reaktor.Message
import Reaktor.Plugins.System.Types
diff --git a/src/Reaktor/Plugins/System/Types.hs b/src/Reaktor/Plugins/System/Types.hs
index 48ec51a..39d2f75 100644
--- a/src/Reaktor/Plugins/System/Types.hs
+++ b/src/Reaktor/Plugins/System/Types.hs
@@ -2,7 +2,7 @@
module Reaktor.Plugins.System.Types where
import Data.Aeson
-import qualified Data.ByteString.Char8 as BS
+import qualified Data.ByteString.Char8.Extended as BS
import qualified Data.Map as M
import Reaktor.Types ()
diff --git a/src/Reaktor/Types.hs b/src/Reaktor/Types.hs
index f2115be..7b5e8fa 100644
--- a/src/Reaktor/Types.hs
+++ b/src/Reaktor/Types.hs
@@ -1,5 +1,4 @@
{-# LANGUAGE OverloadedStrings #-}
-{-# OPTIONS_GHC -fno-warn-orphans #-}
module Reaktor.Types (module Reaktor.Types, module X) where
import Blessings (Blessings)
@@ -8,8 +7,7 @@ import Control.Monad.Trans.State as X (gets,modify)
import Control.Monad.Trans.State (StateT)
import Data.Aeson
import Data.Aeson.Types
-import qualified Data.ByteString.Char8 as BS
-import qualified Data.Text.Encoding as T
+import qualified Data.ByteString.Char8.Extended as BS
import Network.Socket as X (HostName,ServiceName)
@@ -58,11 +56,3 @@ type Param = BS.ByteString
type Command = BS.ByteString
data Message = Message (Maybe Prefix) Command [Param]
deriving Show
-
-
-instance FromJSON BS.ByteString where
- parseJSON (String t) = pure (T.encodeUtf8 t)
- parseJSON _ = pure undefined
-
-instance FromJSONKey BS.ByteString where
- fromJSONKey = FromJSONKeyText T.encodeUtf8
diff --git a/src/Reaktor/Utils.hs b/src/Reaktor/Utils.hs
index bc08a81..725775e 100644
--- a/src/Reaktor/Utils.hs
+++ b/src/Reaktor/Utils.hs
@@ -1,6 +1,6 @@
module Reaktor.Utils where
-import qualified Data.ByteString.Char8 as BS
+import qualified Data.ByteString.Char8.Extended as BS
import Data.Char (chr)
import Data.Char (isDigit)
import Reaktor.Types