Hi all,

I'd like to use parsec to parse IP addresses. So far I've written a (tiny) parser for bytes:

byte :: GenParser Char st Word8
byte = do
         n <- many1 digit
         return (read n)

The function works fine, but it accepts numbers greater than 255.
How do I encapsulate this condition in the parser so that it fails (with en appropriate error message) in this case?


Thanks a lot,

Patrick

--
=====================
Patrick LeBoutillier
Rosemère, Québec, Canada