
6 Aug
2010
6 Aug
'10
4:31 p.m.
On 6 August 2010 20:47, David Sankel
There have been some clever things done with monads aside from #1 and #2. Parsec is one, but it seems applicative functors are a better match for the parsing domain.
Monadic bind is very, very handy for parsing, giving you context sensitive parsing if you need it. If you have a grammar that is LL1 plus helpers (i.e. the extended Kleene operators - many1, sepBy etc.) then applicative formalism is nice and as Doaitse Swierstra has shown provides good opportunities for optimization; but I'd hasten to call it a better match in general.