]> git.immae.eu Git - github/fretlink/text-pipes.git/commitdiff
documentation nonsense
authormichaelt <what_is_it_to_do_anything@yahoo.com>
Sun, 2 Mar 2014 02:06:44 +0000 (21:06 -0500)
committermichaelt <what_is_it_to_do_anything@yahoo.com>
Sun, 2 Mar 2014 02:06:44 +0000 (21:06 -0500)
Pipes/Text.hs
Pipes/Text/IO.hs
changelog

index 9f8442942b5150be7f71218ef5b163571470cf76..e027d0081461c2b451786db3ba1af543b026a692 100644 (file)
@@ -137,10 +137,10 @@ import Prelude hiding (
 
     * /I. Effectful Text/
 
 
     * /I. Effectful Text/
 
-    This package provides @pipes@ utilities for /text streams/, understood as
-    streams of 'Text' chunks. The individual chunks are uniformly /strict/, and thus you 
-    will generally want @Data.Text@ in scope.  But the type @Producer Text m r@ as we
-    are using it is a sort of pipes equivalent of the lazy @Text@ type. 
+    This package provides @pipes@ utilities for /text streams/ or /character streams/, 
+    realized as streams of 'Text' chunks. The individual chunks are uniformly /strict/, 
+    and thus you will generally want @Data.Text@ in scope.  But the type 
+    @Producer Text m r@ ,as we are using it, is a sort of /pipes/ equivalent of the lazy @Text@ type. 
     
     This particular module provides many functions equivalent in one way or another to 
     the pure functions in 
     
     This particular module provides many functions equivalent in one way or another to 
     the pure functions in 
@@ -210,7 +210,7 @@ import Prelude hiding (
     would drop the leading white space from each line. 
 
     The lenses in this library are marked as /improper/; this just means that 
     would drop the leading white space from each line. 
 
     The lenses in this library are marked as /improper/; this just means that 
-    they don't admit all the operations of an ideal lens, but only "getting" and "focussing"
+    they don't admit all the operations of an ideal lens, but only /getting/ and /focusing/
     Just for this reason, though, the magnificent complexities of the lens libraries 
     are a distraction. The lens combinators to keep in mind, the ones that make sense for 
     our lenses, are @view@ \/ @(^.)@), @over@ \/ @(%~)@ , and @zoom@. 
     Just for this reason, though, the magnificent complexities of the lens libraries 
     are a distraction. The lens combinators to keep in mind, the ones that make sense for 
     our lenses, are @view@ \/ @(^.)@), @over@ \/ @(%~)@ , and @zoom@. 
@@ -252,7 +252,7 @@ import Prelude hiding (
     contain at the start. Then we might write something like this:
 
 >     obey :: Monad m => Producer Text m b -> Producer Text m b
     contain at the start. Then we might write something like this:
 
 >     obey :: Monad m => Producer Text m b -> Producer Text m b
->     obey p = do (ts, p') <- lift $ runStateT (zoom (Text.splitAt 8) drawAll) p
+>     obey p = do (ts, p') <- lift $ runStateT (zoom (Text.splitAt 7) drawAll) p
 >                 let seven = T.concat ts
 >                 case T.toUpper seven of 
 >                    "TOUPPER" -> p' >-> Text.toUpper
 >                 let seven = T.concat ts
 >                 case T.toUpper seven of 
 >                    "TOUPPER" -> p' >-> Text.toUpper
@@ -260,6 +260,11 @@ import Prelude hiding (
 >                    _         -> do yield seven
 >                                    p'
 
 >                    _         -> do yield seven
 >                                    p'
 
+
+> >>> let doc = each ["toU","pperTh","is document.\n"]
+> >>> runEffect $ obey doc >-> Text.stdout
+> THIS DOCUMENT.
+
     The purpose of exporting lenses is the mental economy achieved with this three-way 
     applicability. That one expression, e.g. @lines@ or @splitAt 17@ can have these 
     three uses is no more surprising than that a pipe can act as a function modifying 
     The purpose of exporting lenses is the mental economy achieved with this three-way 
     applicability. That one expression, e.g. @lines@ or @splitAt 17@ can have these 
     three uses is no more surprising than that a pipe can act as a function modifying 
@@ -314,7 +319,7 @@ import Prelude hiding (
 
 >    join :: Monad m => Producer Text m (Producer m r) -> Producer m r
 
 
 >    join :: Monad m => Producer Text m (Producer m r) -> Producer m r
 
-    The return type of 'lines', 'words', 'chunksOf' and the other "splitter" functions,
+    The return type of 'lines', 'words', 'chunksOf' and the other /splitter/ functions,
     @FreeT (Producer m Text) m r@ -- our @Texts m r@ -- is the type of (effectful)
     lists of (effectful) texts. The type @([Text],r)@ might be seen to gather
     together things of the forms:
     @FreeT (Producer m Text) m r@ -- our @Texts m r@ -- is the type of (effectful)
     lists of (effectful) texts. The type @([Text],r)@ might be seen to gather
     together things of the forms:
@@ -368,7 +373,7 @@ import Prelude hiding (
     of @FreeT (Producer Text m) m r@ is simply the 'effectful' version of this. 
     
     The @Pipes.Group@ module, which can generally be imported without qualification,
     of @FreeT (Producer Text m) m r@ is simply the 'effectful' version of this. 
     
     The @Pipes.Group@ module, which can generally be imported without qualification,
-    provides many functions for working with things of type @FreeT (Producer a m) m r@
+    provides many functions for working with things of type @FreeT (Producer a m) m r@.
     In particular it conveniently exports the constructors for @FreeT@ and the associated
     @FreeF@ type -- a fancy form of @Either@, namely 
     
     In particular it conveniently exports the constructors for @FreeT@ and the associated
     @FreeF@ type -- a fancy form of @Either@, namely 
     
index 627582e26be8150e8509c2e70907c23dff434eef..de49c7b9487927d5c4eeea629387d281652a4a7b 100644 (file)
@@ -39,9 +39,9 @@ import Prelude hiding (readFile, writeFile)
     'stdin' and 'stdout'.  Some caveats described below. 
     
     The main points are as in 
     'stdin' and 'stdout'.  Some caveats described below. 
     
     The main points are as in 
-    <https://hackage.haskell.org/package/pipes-bytestring-1.0.0/docs/Pipes-ByteString.html Pipes.ByteString>
+    <https://hackage.haskell.org/package/pipes-bytestring-1.0.0/docs/Pipes-ByteString.html Pipes.ByteString>:
     
     
-    An 'IO.Handle' can be associated with a 'Producer' or 'Consumer' according 
+    A 'Handle' can be associated with a 'Producer' or 'Consumer' according 
     as it is read or written to.
     
 > import Pipes
     as it is read or written to.
     
 > import Pipes
index 2fada4e4404510f8f8c32c032137a88903b3ba51..7bc92ba86ae47643eb4afc30f2d6efe86c74c88a 100644 (file)
--- a/changelog
+++ b/changelog
@@ -1,3 +1,7 @@
+# Version 0.0.0.9
+
+* Documentation changes.
+
 # Version 0.0.0.7
 
  * Used the new text-stream-decoding package
 # Version 0.0.0.7
 
  * Used the new text-stream-decoding package