[Haskell-cafe] i am missing something really trivial with parsec

Brent Yorgey byorgey at seas.upenn.edu
Wed Sep 30 06:54:01 EDT 2009


On Tue, Sep 29, 2009 at 12:54:21AM -0700, Anatoly Yakovenko wrote:
> number = do { num <- natural
>             ; return $ num
>             }
> main = do
>    txt <- hGetContents stdin
>    print $ parse number "stdin" txt
> 
> 
> why doesn't that work?

Could you be a little more specific?  What are you expecting to
happen, and what happens instead/what error message do you get?

-Brent


More information about the Haskell-Cafe mailing list