aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authormichaelt <what_is_it_to_do_anything@yahoo.com>2015-04-30 22:31:43 -0400
committermichaelt <what_is_it_to_do_anything@yahoo.com>2015-04-30 22:31:43 -0400
commit77c322613ac2bddfb9604c63e4f2d486b8f6681e (patch)
treec082d452443a8b7f3ae6e328cddf2c61b6fe833a /examples
parent73cbeef8a882c58cec0de3d02227f79aa7fbd578 (diff)
downloadtext-pipes-77c322613ac2bddfb9604c63e4f2d486b8f6681e.tar.gz
text-pipes-77c322613ac2bddfb9604c63e4f2d486b8f6681e.tar.zst
text-pipes-77c322613ac2bddfb9604c63e4f2d486b8f6681e.zip
examples
Diffstat (limited to 'examples')
-rw-r--r--examples/decode.hs3
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
10import qualified Pipes.Text as Text 10import qualified Pipes.Text as Text
11import qualified Pipes.Text.Encoding as Text 11import 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)
14parser :: Monad m => Parser ByteString m [Text] 15parser :: Monad m => Parser ByteString m [Text]
15parser = zoom (Text.utf8 . Text.splitAt 10) drawAll 16parser = zoom (Text.utf8 . Text.splitAt 10) drawAll
16 17