summaryrefslogtreecommitdiffstats
path: root/src/Blessings
diff options
context:
space:
mode:
Diffstat (limited to 'src/Blessings')
-rw-r--r--src/Blessings/ByteString.hs17
-rw-r--r--src/Blessings/ByteString/Lazy.hs17
2 files changed, 34 insertions, 0 deletions
diff --git a/src/Blessings/ByteString.hs b/src/Blessings/ByteString.hs
new file mode 100644
index 0000000..d914818
--- /dev/null
+++ b/src/Blessings/ByteString.hs
@@ -0,0 +1,17 @@
+{-# OPTIONS_GHC -fno-warn-orphans #-}
+
+module Blessings.ByteString
+ ( module Blessings
+ ) where
+
+import Blessings
+import Blessings.Internal
+import qualified Data.ByteString.Char8 as B
+
+
+instance Blessable B.ByteString where
+ length = B.length
+ drop = B.drop
+ take = B.take
+ intercalate = B.intercalate
+ fromWord8 = B.pack . show
diff --git a/src/Blessings/ByteString/Lazy.hs b/src/Blessings/ByteString/Lazy.hs
new file mode 100644
index 0000000..a32f29b
--- /dev/null
+++ b/src/Blessings/ByteString/Lazy.hs
@@ -0,0 +1,17 @@
+{-# OPTIONS_GHC -fno-warn-orphans #-}
+
+module Blessings.ByteString.Lazy
+ ( module Blessings
+ ) where
+
+import Blessings
+import Blessings.Internal
+import qualified Data.ByteString.Lazy.Char8 as L
+
+
+instance Blessable L.ByteString where
+ length = fromIntegral . L.length
+ drop = L.drop . fromIntegral
+ take = L.take . fromIntegral
+ intercalate = L.intercalate
+ fromWord8 = L.pack . show