aboutsummaryrefslogtreecommitdiffhomepage
path: root/Pipes
diff options
context:
space:
mode:
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)