-
Notifications
You must be signed in to change notification settings - Fork 68
Description
The Scanl type now represents the use cases where we need to extract the intermediate values of the accumulator. The Fold type would not have the extract operation anymore thus making the accumulator opaque until the fold finishes. The Fold type is more of a simpler parser now. Can we push all the non-failing parser use-cases from Parser to the Fold type? Pushing backtracking into Folds would make tee/distribute less useful (more complicated) but anyway that is the domain of scans.
But backtracking can potentially make the splitWith applicative less efficient, so maybe keep the Fold type for non-backtracking cases and use a new Parslet type for non-failing backtracking parsers.
The consumer types will then have this hierarchy (more general to more specialized): Scanl => Fold => Parslet => Parser.