[Haskell-beginners] IO - getContents - putStrLn

Tobias Brandt tob.brandt at googlemail.com
Sat Jun 16 20:10:01 CEST 2012

On 16 June 2012 20:03, Robert Heumüller <mailing at heum.de> wrote:
> The program compiles and runs without any problems. But there is
> absolutely no output, when f.eg. i type "hello, world" and hit return.
> Why would that be?

getContents reads the entire input to the program. Under Linux
you can terminate input with Ctrl-D. If you want to only read
a single line, use getLine.

More information about the Beginners mailing list