Hi,
Would it be feasible to have a parser which worked in a different monad than its producer? And would it make sense?
Something like this:
type Parser a t m r = forall x. StateT (Producer a m x) (t m) r
Where t is an instance of MonadTrans. For example, if t is itself a Producer, we have a streaming parser.
Of course, we can just hoist lift the Producer which is passed to the parser, and then somehow remove the unused monad layer in the result Producer, after running the parser. But this is kind of ugly.