[Haskell-beginners] define action getInt like getLine

Daniel Fischer daniel.is.fischer at web.de
Mon Feb 8 16:58:56 EST 2010


Am Montag 08 Februar 2010 22:43:01 schrieb kane96 at gmx.de:
> but I have to write the action
> readMonth :: IO Month
> on my own and still don't have an idea how to do it

Go take a look at

http://www.haskell.org/ghc/docs/6.12.1/html/libraries/base-4.2.0.0/Prelude.html#v%3Aread
http://www.haskell.org/ghc/docs/6.12.1/html/libraries/base-4.2.0.0/Prelude.html#v%3AreadLn
http://www.haskell.org/ghc/docs/6.12.1/html/libraries/base-4.2.0.0/Prelude.html#v%3AgetLine

The documentation should help you.




More information about the Beginners mailing list