From 595847e02221bd09568bd8eb9d7811cea19f406f Mon Sep 17 00:00:00 2001 From: Soumik Sarkar Date: Thu, 20 Jun 2024 06:12:39 +0530 Subject: [PATCH] Fix docs for {D.B,D.B.Lazy}.{spanEnd,breakEnd} (#683) --- Data/ByteString.hs | 4 ++-- Data/ByteString/Lazy.hs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Data/ByteString.hs b/Data/ByteString.hs index 2dc741463..05dff5ed5 100644 --- a/Data/ByteString.hs +++ b/Data/ByteString.hs @@ -1072,7 +1072,7 @@ breakByte c p = case elemIndex c p of -- | Returns the longest (possibly empty) suffix of elements which __do not__ -- satisfy the predicate and the remainder of the string. -- --- 'breakEnd' @p@ is equivalent to @'spanEnd' (not . p)@ and to @('takeWhileEnd' (not . p) &&& 'dropWhileEnd' (not . p))@. +-- 'breakEnd' @p@ is equivalent to @'spanEnd' (not . p)@ and to @('dropWhileEnd' (not . p) &&& 'takeWhileEnd' (not . p))@. -- breakEnd :: (Word8 -> Bool) -> ByteString -> (ByteString, ByteString) breakEnd p ps = splitAt (findFromEndUntil p ps) ps @@ -1117,7 +1117,7 @@ spanByte c ps@(BS x l) = -- | Returns the longest (possibly empty) suffix of elements -- satisfying the predicate and the remainder of the string. -- --- 'spanEnd' @p@ is equivalent to @'breakEnd' (not . p)@ and to @('takeWhileEnd' p &&& 'dropWhileEnd' p)@. +-- 'spanEnd' @p@ is equivalent to @'breakEnd' (not . p)@ and to @('dropWhileEnd' p &&& 'takeWhileEnd' p)@. -- -- We have -- diff --git a/Data/ByteString/Lazy.hs b/Data/ByteString/Lazy.hs index bf8bb3d7e..a389d5d31 100644 --- a/Data/ByteString/Lazy.hs +++ b/Data/ByteString/Lazy.hs @@ -989,7 +989,7 @@ break f = break' -- | Returns the longest (possibly empty) suffix of elements which __do not__ -- satisfy the predicate and the remainder of the string. -- --- 'breakEnd' @p@ is equivalent to @'spanEnd' (not . p)@ and to @('takeWhileEnd' (not . p) &&& 'dropWhileEnd' (not . p))@. +-- 'breakEnd' @p@ is equivalent to @'spanEnd' (not . p)@ and to @('dropWhileEnd' (not . p) &&& 'takeWhileEnd' (not . p))@. -- -- @since 0.11.2.0 breakEnd :: (Word8 -> Bool) -> ByteString -> (ByteString, ByteString) @@ -1059,7 +1059,7 @@ span p = break (not . p) -- | Returns the longest (possibly empty) suffix of elements -- satisfying the predicate and the remainder of the string. -- --- 'spanEnd' @p@ is equivalent to @'breakEnd' (not . p)@ and to @('takeWhileEnd' p &&& 'dropWhileEnd' p)@. +-- 'spanEnd' @p@ is equivalent to @'breakEnd' (not . p)@ and to @('dropWhileEnd' p &&& 'takeWhileEnd' p)@. -- -- We have --