summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2025-03-11 01:44:32 +0100
committertv <tv@krebsco.de>2025-03-11 01:49:34 +0100
commit37b0426c86840901e9657b0a5e499c48cc04159a (patch)
tree6b132cf32f14ca1e30e00c6edd915615ce1f70bf
parentee7cc48b0814f2188277305d03b5297fcee36eeb (diff)
Add support for Data.ByteString.Lazy
-rw-r--r--blessings.cabal1
-rw-r--r--src/Blessings/ByteString/Lazy.hs17
2 files changed, 18 insertions, 0 deletions
diff --git a/blessings.cabal b/blessings.cabal
index c7d096b..7c3f6b6 100644
--- a/blessings.cabal
+++ b/blessings.cabal
@@ -13,6 +13,7 @@ library
exposed-modules:
Blessings,
Blessings.ByteString,
+ Blessings.ByteString.Lazy,
Blessings.Internal,
Blessings.String,
Blessings.Text
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