[Haskell-beginners] Parsec Many Mishap

Walter Askew waltaskew at gmail.com
Tue May 6 21:09:42 UTC 2014


> First, when you post something like this, please put enough code to at least compile.  I had to spend five minutes adding some code to make this compile.

Sorry about that, but thank you very much for your help!

> The reason it doesn't work is your manyTill anyChar nextCommand.  In this case nextCommand actually slurps up the next hashtag, leaving you positioned at " It was ...", then you try to match another command, and it fails, and terminates.

Thanks, that makes sense.  I was foolishly looking at the try’s in nextCommand, imagining that they would solve all of my look ahead problems and apparently forgetting they gobble input on success.  Thanks again!


More information about the Beginners mailing list