aboutsummaryrefslogtreecommitdiffhomepage
path: root/Pipes
diff options
context:
space:
mode:
authormichaelt <what_is_it_to_do_anything@yahoo.com>2014-11-11 17:52:47 -0500
committermichaelt <what_is_it_to_do_anything@yahoo.com>2014-11-11 17:52:47 -0500
commitb28660f6df52c0da5995318765c37cec65f19225 (patch)
tree4feb8c4d29143e3ee6df9853d8b65fd194fb5de9 /Pipes
parente20590eb8363a227372d729b23cc7594b4976560 (diff)
downloadtext-pipes-b28660f6df52c0da5995318765c37cec65f19225.tar.gz
text-pipes-b28660f6df52c0da5995318765c37cec65f19225.tar.zst
text-pipes-b28660f6df52c0da5995318765c37cec65f19225.zip
travis
Diffstat (limited to 'Pipes')
-rw-r--r--Pipes/Text.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Pipes/Text.hs b/Pipes/Text.hs
index 0f2e31d..f71f17f 100644
--- a/Pipes/Text.hs
+++ b/Pipes/Text.hs
@@ -148,7 +148,7 @@ a ^. lens = getConstant (lens Constant a)
148-- | Apply a transformation to each 'Char' in the stream 148-- | Apply a transformation to each 'Char' in the stream
149 149
150-- >>> let margaret = ["Margaret, are you grieving\nOver Golde","ngrove unleaving?":: Text] 150-- >>> let margaret = ["Margaret, are you grieving\nOver Golde","ngrove unleaving?":: Text]
151-- >>> TL.putStrLn $ toLazy $ each margaret >-> map Data.Char.toUpper 151-- >>> TL.putStrLn . toLazy $ each margaret >-> map Data.Char.toUpper
152-- MARGARET, ARE YOU GRIEVING 152-- MARGARET, ARE YOU GRIEVING
153-- OVER GOLDENGROVE UNLEAVING? 153-- OVER GOLDENGROVE UNLEAVING?
154map :: (Monad m) => (Char -> Char) -> Pipe Text Text m r 154map :: (Monad m) => (Char -> Char) -> Pipe Text Text m r
@@ -168,7 +168,7 @@ take :: (Monad m, Integral a) => a -> Pipe Text Text m ()
168take n0 = go n0 where 168take n0 = go n0 where
169 go n 169 go n
170 | n <= 0 = return () 170 | n <= 0 = return ()
171 | otherwise = do 171 | otherwise = do
172 txt <- await 172 txt <- await
173 let len = fromIntegral (T.length txt) 173 let len = fromIntegral (T.length txt)
174 if (len > n) 174 if (len > n)