From f328ae9eff47540e4dffb9c932c67ea55491726e Mon Sep 17 00:00:00 2001 From: michaelt Date: Sat, 6 Feb 2016 17:36:47 -0500 Subject: [PATCH] repair comments in line-based module --- Pipes/Prelude/Text.hs | 14 ++++++++------ 1 file 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) import Prelude hiding (readFile, writeFile) {- $lineio - Line-based operations are marked with a final \-@Ln@, like 'stdinLn', 'readFileLn'. They are + Line-based operations are marked with a final \-@Ln@, like 'stdinLn', 'readFileLn', etc. They are drop-in replacements for the line-based operations in @Pipes.Prelude@ and @Pipes.Safe.Prelude@ - the final \-@Ln@ being added where necessary. With them, one is producing, piping and consuming semantically significant individual texts, - understood as lines, just as one would pipe 'Int's. The standard materials from @Pipes@ and @Pipes.Prelude@ and - @Data.Text@ are all you need to interact with these lines as you read or write them. - You can use these operations without using any of the other material in this package. + understood as lines, just as one would produce or pipe 'Int's or 'Char's or anything else. + Thus, the standard materials from @Pipes@ and @Pipes.Prelude@ and + @Data.Text@ are all you need to interact with these lines as you read or write them, and + you can use these operations without using any of the other material in this package. Thus, to take a trivial case, here we upper-case three lines from standard input and write them to a file. @@ -52,8 +53,9 @@ ONE TWO THREE - The point of view is very much that of @Pipes.Prelude@ and the user who needs no more - can use them ignoring the rest of this package. + The point of view is very much that of @Pipes.Prelude@. It would still be the same even if + we did something more sophisticated, like run an ordinary attoparsec 'Text' parser on + each line, as if frequently reasonable. The line-based operations are, however, subject to a number of caveats. First, where they read from a handle, they will of course happily -- 2.41.0