composewell / streamly

High performance, concurrent functional programming abstractions
https://streamly.composewell.com
Other
849 stars 63 forks source link

"Fold m a b" vs "Parser a m b" type inconsistency #2714

Open harendra-kumar opened 5 months ago

harendra-kumar commented 5 months ago

We made the parser type Parser a m b so that MonadTrans instance is possible. Although, we found that implementing local is not possible for Parser unless some changes are made to the type which may affect perf.

Now Fold and Parser are similar in nature and interconvertible but their types are inconsistent. We need to decide and keep it consistent across both.