Commits

Bryan O'Sullivan committed 69d4bdc

I forgot to document incremental parsing

  • Participants
  • Parent commits ee9e16b
  • Tags 0.7.2

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