From 4fa5cb937c016f8c10bf8f40d017ca3a436db2d3 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 23 Jan 2019 13:15:20 +0100 Subject: Reaktor.Plugins.System: print exec errors to IRC --- src/Data/ByteString/Char8/Extended.hs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/Data') diff --git a/src/Data/ByteString/Char8/Extended.hs b/src/Data/ByteString/Char8/Extended.hs index 4d46cd2..ca0c44a 100644 --- a/src/Data/ByteString/Char8/Extended.hs +++ b/src/Data/ByteString/Char8/Extended.hs @@ -1,11 +1,14 @@ {-# OPTIONS_GHC -fno-warn-orphans #-} module Data.ByteString.Char8.Extended ( module Data.ByteString.Char8 + , show ) where import Data.Aeson import Data.ByteString.Char8 import Data.Text.Encoding (encodeUtf8) +import Prelude hiding (show) +import qualified Prelude instance FromJSON ByteString where parseJSON (String t) = pure (encodeUtf8 t) @@ -13,3 +16,6 @@ instance FromJSON ByteString where instance FromJSONKey ByteString where fromJSONKey = FromJSONKeyText encodeUtf8 + +show :: Show a => a -> ByteString +show = pack . Prelude.show -- cgit v1.2.3