aboutsummaryrefslogtreecommitdiffhomepage
path: root/Pipes
diff options
context:
space:
mode:
Diffstat (limited to 'Pipes')
-rw-r--r--Pipes/Prelude/Text.hs14
1 files changed, 8 insertions, 6 deletions
diff --git a/Pipes/Prelude/Text.hs b/Pipes/Prelude/Text.hs
index faa096c..be5b502 100644
--- a/Pipes/Prelude/Text.hs
+++ b/Pipes/Prelude/Text.hs
@@ -28,13 +28,14 @@ import Pipes.Safe (MonadSafe(..), runSafeT, runSafeP)
28import Prelude hiding (readFile, writeFile) 28import Prelude hiding (readFile, writeFile)
29 29
30{- $lineio 30{- $lineio
31 Line-based operations are marked with a final \-@Ln@, like 'stdinLn', 'readFileLn'. They are 31 Line-based operations are marked with a final \-@Ln@, like 'stdinLn', 'readFileLn', etc. They are
32 drop-in replacements for the line-based operations in @Pipes.Prelude@ and 32 drop-in replacements for the line-based operations in @Pipes.Prelude@ and
33 @Pipes.Safe.Prelude@ - the final \-@Ln@ being added where necessary. 33 @Pipes.Safe.Prelude@ - the final \-@Ln@ being added where necessary.
34 With them, one is producing, piping and consuming semantically significant individual texts, 34 With them, one is producing, piping and consuming semantically significant individual texts,
35 understood as lines, just as one would pipe 'Int's. The standard materials from @Pipes@ and @Pipes.Prelude@ and 35 understood as lines, just as one would produce or pipe 'Int's or 'Char's or anything else.
36 @Data.Text@ are all you need to interact with these lines as you read or write them. 36 Thus, the standard materials from @Pipes@ and @Pipes.Prelude@ and
37 You can use these operations without using any of the other material in this package. 37 @Data.Text@ are all you need to interact with these lines as you read or write them, and
38 you can use these operations without using any of the other material in this package.
38 39
39 Thus, to take a trivial case, here we upper-case three lines from standard input and write 40 Thus, to take a trivial case, here we upper-case three lines from standard input and write
40 them to a file. 41 them to a file.
@@ -52,8 +53,9 @@ ONE
52TWO 53TWO
53THREE 54THREE
54 55
55 The point of view is very much that of @Pipes.Prelude@ and the user who needs no more 56 The point of view is very much that of @Pipes.Prelude@. It would still be the same even if
56 can use them ignoring the rest of this package. 57 we did something more sophisticated, like run an ordinary attoparsec 'Text' parser on
58 each line, as if frequently reasonable.
57 59
58 The line-based operations are, however, subject to a number of caveats. 60 The line-based operations are, however, subject to a number of caveats.
59 First, where they read from a handle, they will of course happily 61 First, where they read from a handle, they will of course happily