X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=Pipes%2FText.hs;h=396633aee5218b38cf4993a07a3eb6ff95d79931;hb=b0d86a59271dbb20a092ca359860a0efe76a849d;hp=cd6374295119dac26892dc455ef02bcfe622223a;hpb=0f8c6f1bac4b42f7e20b33e78b61ed004758a04a;p=github%2Ffretlink%2Ftext-pipes.git 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;