summaryrefslogtreecommitdiffstats
path: root/src/Blessings
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-03-07 13:35:55 +0100
committertv <tv@krebsco.de>2026-03-07 13:35:55 +0100
commita2d987d58aabe0bf3e15315b2541ee6dfb309608 (patch)
tree8f0b930567b16445a54696d699da5e27fe3d8b6f /src/Blessings
parentf292fb854fdbd13e474b9706e10c9a52bcb399a1 (diff)
add break
Diffstat (limited to 'src/Blessings')
-rw-r--r--src/Blessings/ByteString.hs1
-rw-r--r--src/Blessings/ByteString/Lazy.hs1
-rw-r--r--src/Blessings/Internal.hs1
-rw-r--r--src/Blessings/String.hs1
-rw-r--r--src/Blessings/String/WCWidth.hs1
-rw-r--r--src/Blessings/Text.hs1
-rw-r--r--src/Blessings/Text/WCWidth.hs1
7 files changed, 7 insertions, 0 deletions
diff --git a/src/Blessings/ByteString.hs b/src/Blessings/ByteString.hs
index 42139fa..6c4ed76 100644
--- a/src/Blessings/ByteString.hs
+++ b/src/Blessings/ByteString.hs
@@ -14,5 +14,6 @@ instance Blessable B.ByteString where
drop = B.drop
take = B.take
splitAt = B.splitAt
+ break = B.break
intercalate = B.intercalate
fromWord8 = B.pack . show
diff --git a/src/Blessings/ByteString/Lazy.hs b/src/Blessings/ByteString/Lazy.hs
index c0f521c..79361b7 100644
--- a/src/Blessings/ByteString/Lazy.hs
+++ b/src/Blessings/ByteString/Lazy.hs
@@ -14,5 +14,6 @@ instance Blessable L.ByteString where
drop = L.drop . fromIntegral
take = L.take . fromIntegral
splitAt = L.splitAt . fromIntegral
+ break = L.break
intercalate = L.intercalate
fromWord8 = L.pack . show
diff --git a/src/Blessings/Internal.hs b/src/Blessings/Internal.hs
index 38c9069..7e5aeb1 100644
--- a/src/Blessings/Internal.hs
+++ b/src/Blessings/Internal.hs
@@ -9,5 +9,6 @@ class (IsString a, Monoid a) => Blessable a where
drop :: Int -> a -> a
take :: Int -> a -> a
splitAt :: Int -> a -> (a, a)
+ break :: (Char -> Bool) -> a -> (a, a)
intercalate :: a -> [a] -> a
fromWord8 :: Word8 -> a
diff --git a/src/Blessings/String.hs b/src/Blessings/String.hs
index bc3d8cc..fa0f939 100644
--- a/src/Blessings/String.hs
+++ b/src/Blessings/String.hs
@@ -15,5 +15,6 @@ instance Blessable String where
drop = L.drop
take = L.take
splitAt = L.splitAt
+ break = L.break
intercalate = L.intercalate
fromWord8 = show
diff --git a/src/Blessings/String/WCWidth.hs b/src/Blessings/String/WCWidth.hs
index 2160f99..7935019 100644
--- a/src/Blessings/String/WCWidth.hs
+++ b/src/Blessings/String/WCWidth.hs
@@ -18,6 +18,7 @@ instance Blessable String where
drop = drop'
take = take'
splitAt = splitAt'
+ break = List.break
intercalate = List.intercalate
fromWord8 = show
diff --git a/src/Blessings/Text.hs b/src/Blessings/Text.hs
index 236b5d0..4516d72 100644
--- a/src/Blessings/Text.hs
+++ b/src/Blessings/Text.hs
@@ -15,5 +15,6 @@ instance Blessable Text where
drop = T.drop
take = T.take
splitAt = T.splitAt
+ break = T.break
intercalate = T.intercalate
fromWord8 = T.pack . show
diff --git a/src/Blessings/Text/WCWidth.hs b/src/Blessings/Text/WCWidth.hs
index 277e1a1..ccc0864 100644
--- a/src/Blessings/Text/WCWidth.hs
+++ b/src/Blessings/Text/WCWidth.hs
@@ -18,6 +18,7 @@ instance Blessable Text where
drop = drop'
take = take'
splitAt = splitAt'
+ break = Text.break
intercalate = Text.intercalate
fromWord8 = Text.pack . show