[Haskell-cafe] Parsers are monadic?

Gregory Propf gregorypropf at yahoo.com
Sat Jun 30 01:27:32 EDT 2007

First post.  I'm a newbie, been using Haskell for about a week and love it.  Anyway, this is something I don't understand.  Parsers are monadic.  I can see this if the parser is reading from an input stream but if there's just a block of text can't you just have the parser call itself recursively feeding the unparsed text down the recursion and tacking nodes onto the tree as the recursions return, finally returning the whole tree to the top level caller.  Seems this meets the criteria for pure functionality, same result every time with same args.

myParser :: [Char] -> ParseTree

Get the free Yahoo! toolbar and rest assured with the added security of spyware protection.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20070629/0a8d2cfd/attachment.htm

More information about the Haskell-Cafe mailing list