on master help sign in
Add some design notes to chunked parser
fedc420Harendra Kumar
core/src/Streamly/Internal/Data/Parser/Chunked.hs+12
@@ -7,6 +7,18 @@
7-- Maintainer : streamly@composewell.com
7-- Maintainer : streamly@composewell.com
8-- Stability : pre-release
8-- Stability : pre-release
9-- Portability : GHC
9-- Portability : GHC
10+--
11+-- Differences from an item parser:
12+--
13+-- * Driver drives from a chunk stream
14+-- * Backtrack buffer is a chunk stream instead of a list
15+-- * Monad and Alternative can handle chunks
16+-- * Parser takes stream position and returns new stream position
17+--
18+-- We can possibly use the same type for item and chunk parsers, but with
19+-- different implementations for instances. So it could just be a newtype
20+-- wrapper rather than a different type. And then we can even have the parser
21+-- type and chunkedParseBreak in the Parser module itself.
10
22
11module Streamly.Internal.Data.Parser.Chunked
23module Streamly.Internal.Data.Parser.Chunked
12 (
24 (