Skip to content

Commit

Permalink
Clarify documentation for lazy bytestring and text parsers
Browse files Browse the repository at this point in the history
This fixes haskellgh-52.
  • Loading branch information
bos committed Jan 9, 2014
1 parent c96ba2a commit 4f10f29
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
13 changes: 7 additions & 6 deletions Data/Attoparsec/ByteString/Lazy.hs
Expand Up @@ -7,19 +7,20 @@
-- Stability : experimental
-- Portability : unknown
--
-- Simple, efficient combinator parsing for lazy 'ByteString'
-- strings, loosely based on the Parsec library.
-- Simple, efficient combinator parsing that can consume lazy
-- 'ByteString' strings, loosely based on the Parsec library.
--
-- This is essentially the same code as in the 'Data.Attoparsec'
-- module, only with a 'parse' function that can consume a lazy
-- 'ByteString' incrementally, and a 'Result' type that does not allow
-- more input to be fed in. Think of this as suitable for use with a
-- lazily read file, e.g. via 'L.readFile' or 'L.hGetContents'.
--
-- Behind the scenes, strict 'B.ByteString' values are still used
-- internally to store parser input and manipulate it efficiently.
-- High-performance parsers such as 'string' still expect strict
-- 'B.ByteString' parameters.
-- /Note:/ The various parser functions and combinators such as
-- 'string' still expect /strict/ 'B.ByteString' parameters, and
-- return strict 'B.ByteString' results. Behind the scenes, strict
-- 'B.ByteString' values are still used internally to store parser
-- input and manipulate it efficiently.

module Data.Attoparsec.ByteString.Lazy
(
Expand Down
11 changes: 6 additions & 5 deletions Data/Attoparsec/Text/Lazy.hs
Expand Up @@ -7,7 +7,7 @@
-- Stability : experimental
-- Portability : unknown
--
-- Simple, efficient combinator parsing for lazy 'Text'
-- Simple, efficient combinator parsing that can consume lazy 'Text'
-- strings, loosely based on the Parsec library.
--
-- This is essentially the same code as in the 'Data.Attoparsec.Text'
Expand All @@ -16,10 +16,11 @@
-- more input to be fed in. Think of this as suitable for use with a
-- lazily read file, e.g. via 'L.readFile' or 'L.hGetContents'.
--
-- Behind the scenes, strict 'T.Text' values are still used
-- internally to store parser input and manipulate it efficiently.
-- High-performance parsers such as 'string' still expect strict
-- 'T.Text' parameters.
-- /Note:/ The various parser functions and combinators such as
-- 'string' still expect /strict/ 'T.Text' parameters, and return
-- strict 'T.Text' results. Behind the scenes, strict 'T.Text' values
-- are still used internally to store parser input and manipulate it
-- efficiently.

module Data.Attoparsec.Text.Lazy
(
Expand Down

0 comments on commit 4f10f29

Please sign in to comment.