on master help sign in
Add some design notes to chunked parser
commitfedc42007bb4ee93e47cf8221adac619557af967 authorHarendra Kumar <harendra@composewell.com> dateWed 7 Dec 2022, 14:26 (4 years ago) parent1ad9034
1 file changed+12
core/src/Streamly/Internal/Data/Parser/Chunked.hs+12
core/src/Streamly/Internal/Data/Parser/Chunked.hs+12
@@ -7,6 +7,18 @@
77-- Maintainer : streamly@composewell.com
88-- Stability : pre-release
99-- 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.
1022
1123module Streamly.Internal.Data.Parser.Chunked
1224 (