aboutsummaryrefslogtreecommitdiffstats
path: root/src/Data/ByteString/Char8/Extended.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Data/ByteString/Char8/Extended.hs')
-rw-r--r--src/Data/ByteString/Char8/Extended.hs6
1 files changed, 6 insertions, 0 deletions
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