From b0d86a59271dbb20a092ca359860a0efe76a849d Mon Sep 17 00:00:00 2001 From: michaelt Date: Sun, 26 Jan 2014 09:49:29 -0500 Subject: [PATCH] stripStart missed a bit --- Pipes/Text.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Pipes/Text.hs b/Pipes/Text.hs index cd63742..396633a 100644 --- a/Pipes/Text.hs +++ b/Pipes/Text.hs @@ -389,8 +389,8 @@ unpack = for cat (\t -> yield (T.unpack t)) p >-> unpack = for p (\txt -> yield (T.unpack txt)) #-} --- | @toCaseFold@, @toLower@, @toUpper@ and @stripStart@ are standard 'Text' utility, --- here acting on a 'Text' pipe, rather as they would on a lazy text +-- | @toCaseFold@, @toLower@, @toUpper@ and @stripStart@ are standard 'Text' utilities, +-- here acting as 'Text' pipes, rather as they would on a lazy text toCaseFold :: Monad m => Pipe Text Text m () toCaseFold = P.map T.toCaseFold {-# INLINEABLE toCaseFold #-} @@ -425,7 +425,8 @@ stripStart = do let text = T.stripStart chunk if T.null text then stripStart - else cat + else do yield text + cat {-# INLINEABLE stripStart #-} -- | @(take n)@ only allows @n@ individual characters to pass; -- 2.41.0