Re: [Haskell-cafe] parsing long numbers

2006-09-15 Thread Niklas Broberg
The problem is that, when I run it with strings containing a number more then 10 digit long, I get unexpected integers back: *Main> runP number1 "1234567890 and the rest" [(1234567890," and the rest")] *Main> runP number1 "12345678901 and the rest" [(-539222987," and the rest")] This has nothin

[Haskell-cafe] parsing long numbers

2006-09-15 Thread Andrea Rossato
Hello! I'm trying to learn parsing and parser combinations in Haskell, using, as usual, Wadler's Monads in Functional Programming as my text book. Everything works fine except for a small but annoying problem related to "read". I'm sure it must be something easy, some kind of stupid faq. Still I'