diff options
author | michaelt <what_is_it_to_do_anything@yahoo.com> | 2016-02-06 17:28:23 -0500 |
---|---|---|
committer | michaelt <what_is_it_to_do_anything@yahoo.com> | 2016-02-06 17:28:23 -0500 |
commit | c3e8e47895e5850ed17ab2f43e64a712c1fe0bc3 (patch) | |
tree | a438a448d252387ff7b0c9aae686f6e60a1a6695 /Pipes/Text | |
parent | 7da7dbc8dbf217441300cc21483c65624860e38d (diff) | |
download | text-pipes-c3e8e47895e5850ed17ab2f43e64a712c1fe0bc3.tar.gz text-pipes-c3e8e47895e5850ed17ab2f43e64a712c1fe0bc3.tar.zst text-pipes-c3e8e47895e5850ed17ab2f43e64a712c1fe0bc3.zip |
tutorial repairs
Diffstat (limited to 'Pipes/Text')
-rw-r--r-- | Pipes/Text/Tutorial.hs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Pipes/Text/Tutorial.hs b/Pipes/Text/Tutorial.hs index b021d73..eeaafa7 100644 --- a/Pipes/Text/Tutorial.hs +++ b/Pipes/Text/Tutorial.hs | |||
@@ -43,8 +43,8 @@ import Pipes.Text.Encoding | |||
43 | {- $intro | 43 | {- $intro |
44 | This package provides @pipes@ utilities for /character streams/, | 44 | This package provides @pipes@ utilities for /character streams/, |
45 | realized as streams of 'Text' chunks. The individual chunks are uniformly /strict/, | 45 | realized as streams of 'Text' chunks. The individual chunks are uniformly /strict/, |
46 | and thus the @Text@ type we are using is the one from @Data.Text@, not @Data.Text.Lazy@ | 46 | and thus the @Text@ type we are using is always the one from @Data.Text@, not @Data.Text.Lazy@ |
47 | But the type @Producer Text m r@, as we are using it, is a sort of /pipes/ equivalent of | 47 | The type @Producer Text m r@, as we are using it, is a sort of /pipes/ equivalent of |
48 | the lazy @Text@ type. | 48 | the lazy @Text@ type. |
49 | -} | 49 | -} |
50 | 50 | ||
@@ -60,13 +60,16 @@ import Pipes.Text.Encoding | |||
60 | 60 | ||
61 | {- $pipestextencoding | 61 | {- $pipestextencoding |
62 | In the @text@ library, @Data.Text.Lazy.Encoding@ | 62 | In the @text@ library, @Data.Text.Lazy.Encoding@ |
63 | handles inter-operation with @Data.ByteString.Lazy@. Here, @Pipes.Text.Encoding@ | 63 | handles inter-operation with @Data.ByteString.Lazy@. Similarly here, @Pipes.Text.Encoding@ |
64 | provides for interoperation with the \'effectful ByteStrings\' of @Pipes.ByteString@. | 64 | provides for interoperation with the \'effectful ByteStrings\' of @Pipes.ByteString@. |
65 | -} | 65 | -} |
66 | 66 | ||
67 | {- $pipestextio | 67 | {- $pipestextio |
68 | Simple /IO/ operations are defined in @Pipes.Text.IO@ - as lazy IO @Text@ | 68 | Simple /IO/ operations are defined in @Pipes.Text.IO@ - as lazy IO @Text@ |
69 | operations are in @Data.Text.Lazy.IO@. It is generally | 69 | operations are in @Data.Text.Lazy.IO@. There are also some simple line-based operations |
70 | in @Pipes.Prelude.Text@. The latter do not depend on the conception of effectful text | ||
71 | implemented elsewhere in this package, but just improve on the @stdinLn@ and @writeFile@ of | ||
72 | @Pipes.Prelude@ and @Pipes.Safe.Prelude@ by replacing 'String' with 'Text' | ||
70 | -} | 73 | -} |
71 | 74 | ||
72 | 75 | ||
@@ -139,7 +142,8 @@ import Pipes.Text.Encoding | |||
139 | are a distraction. The lens combinators to keep in mind, the ones that make sense for | 142 | are a distraction. The lens combinators to keep in mind, the ones that make sense for |
140 | our lenses, are @view@, @over@, and @zoom@. | 143 | our lenses, are @view@, @over@, and @zoom@. |
141 | 144 | ||
142 | One need only keep in mind that if @l@ is a @Lens' a b@, then: | 145 | One need only keep in mind that if @l@ is a @Lens' a b@, then the action of the |
146 | leading operations, @view@, @over@, and @zoom@ are as follows: | ||
143 | 147 | ||
144 | -} | 148 | -} |
145 | {- $view | 149 | {- $view |