[Haskell-beginners] Parsec and Validation
Ozgur Akgun
ozgurakgun at gmail.com
Sat Jul 31 16:05:28 EDT 2010
Could you try it with try's:
time :: Parser TimeOfDay
time = choice $ map try [ tTimeHourMin, t24hrClock ]
In a very informal and loose description, if tTimeHourMin consumes some
input before failing, parsec gives up.
Best,
Ozgur
On 31 July 2010 20:57, Vladimir Solmon <vvvladistan at gmail.com> wrote:
> time :: Parser TimeOfDay
> time = choice [ tTimeHourMin,
> t24hrClock
> ]
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/beginners/attachments/20100731/53b73f5e/attachment.html
More information about the Beginners
mailing list