streamly
streamly copied to clipboard
Consider changing signatures of some parsers that use a fold for collecting output
For example:
many :: MonadCatch m => Parser m a b -> Fold m b c -> Parser m a c
Can be changed to:
many :: MonadCatch m => Fold m b c -> Parser m a b -> Parser m a c
That the fold can be used to curry the function to get a signature that is more like the standard many function.
We had a discussion on this and decided to follow the former styles i.e.:
many :: Parser m a b -> Fold m b c -> Parser m a c
The reason is that the tail of the signature expresses a transformation similar to stream -> stream transformation operations. Here we are transforming the input of the Fold, returning a parser.
We need to change all the folds and parsers to follow this style.