From 2842e05c232505c670daee0fffb9a34d5c866217 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 21 Jan 2019 19:14:55 +0100 Subject: src: add Data.ByteString.Char8.Extended --- src/Reaktor/Types.hs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'src/Reaktor/Types.hs') 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 -- cgit v1.2.3