[Haskell-cafe] Monadic parser vs. combinator parser

Stephen Tetley stephen.tetley at gmail.com
Wed Jan 30 18:51:03 CET 2013


On 30 January 2013 12:38, Ertugrul Söylemez <es at ertes.de> wrote:

>
> A monadic parser /is/ a combinator parser.  The code you linked just
> doesn't go as far as wrapping it up with a newtype and providing a monad
> instance.


Further, (+>) in the linked example is monadic bind and `result` is `return`.

The code looks more succinct than early Parser combinator libraries
(like Hutton / Meijer) because it defines quite a few more
combinators. Equivalents are available if you use say Parsec plus the
usual applicative combinators.



More information about the Haskell-Cafe mailing list