diff options
author | michaelt <what_is_it_to_do_anything@yahoo.com> | 2015-04-30 22:31:43 -0400 |
---|---|---|
committer | michaelt <what_is_it_to_do_anything@yahoo.com> | 2015-04-30 22:31:43 -0400 |
commit | 77c322613ac2bddfb9604c63e4f2d486b8f6681e (patch) | |
tree | c082d452443a8b7f3ae6e328cddf2c61b6fe833a /examples | |
parent | 73cbeef8a882c58cec0de3d02227f79aa7fbd578 (diff) | |
download | text-pipes-77c322613ac2bddfb9604c63e4f2d486b8f6681e.tar.gz text-pipes-77c322613ac2bddfb9604c63e4f2d486b8f6681e.tar.zst text-pipes-77c322613ac2bddfb9604c63e4f2d486b8f6681e.zip |
examples
Diffstat (limited to 'examples')
-rw-r--r-- | examples/decode.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/decode.hs b/examples/decode.hs index 177325d..d5fe558 100644 --- a/examples/decode.hs +++ b/examples/decode.hs | |||
@@ -10,7 +10,8 @@ import qualified Pipes.ByteString as ByteString | |||
10 | import qualified Pipes.Text as Text | 10 | import qualified Pipes.Text as Text |
11 | import qualified Pipes.Text.Encoding as Text | 11 | import qualified Pipes.Text.Encoding as Text |
12 | 12 | ||
13 | -- Retrieve all `Text` chunks up to 10 characters | 13 | -- Retrieve utf8-encode `Text` chunk(s) up to 10 characters |
14 | -- from the bytestring (this can have various byte lengths) | ||
14 | parser :: Monad m => Parser ByteString m [Text] | 15 | parser :: Monad m => Parser ByteString m [Text] |
15 | parser = zoom (Text.utf8 . Text.splitAt 10) drawAll | 16 | parser = zoom (Text.utf8 . Text.splitAt 10) drawAll |
16 | 17 | ||