Bryan O'Sullivan avatar Bryan O'Sullivan committed 69d4bdc

I forgot to document incremental parsing

Comments (0)

Files changed (3)

Data/Attoparsec/Char8.hs

     , module Data.Attoparsec.Combinator
     ) where
 
-import qualified Data.ByteString.Char8 as SB
 import qualified Data.ByteString.Lazy.Char8 as LB
 import Data.ByteString.Internal (w2c)
 import Data.Char (isDigit, isLetter, isSpace, toLower)
-import Data.Attoparsec.FastSet
-    (FastSet, charClass, memberChar, set)
+import Data.Attoparsec.FastSet (charClass, memberChar)
 import qualified Data.Attoparsec.Internal as I
 import Data.Attoparsec.Combinator
 import Data.Attoparsec.Internal

Data/Attoparsec/Incremental.hs

 -----------------------------------------------------------------------------
 module Data.Attoparsec.Incremental
     (
+    -- * Incremental parsing
+    -- $incremental
+
     -- * Parser types
       Parser
     , Result(..)
 import qualified Data.ByteString.Lazy.Internal as L
 import Prelude hiding (takeWhile)
 
+-- $incremental
+-- Incremental parsing makes it possible to supply a parser with only
+-- a limited amount of input.  If the parser cannot complete due to
+-- lack of data, it will return a 'Partial' result with a continuation
+-- to which more input can be supplied, as follows:
+--
+-- >   case parse myParser someInput of
+-- >     Partial k -> k moreInput
+--
+-- To signal that no more input is available, pass an empty
+-- string to this continuation.
+
 data S = S {-# UNPACK #-} !S.ByteString -- first chunk of input
            L.ByteString                 -- rest of input
            [L.ByteString]               -- input acquired during backtracks
 name:            attoparsec
-version:         0.7.1
+version:         0.7.2
 license:         BSD3
 license-file:    LICENSE
 category:        Text, Parsing
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.