[Haskell-beginners] IO - getContents - putStrLn

Michael Orlitzky michael at orlitzky.com
Sat Jun 16 20:10:55 CEST 2012

On 06/16/12 14:03, Robert Heumüller wrote:
> Hi,
> this is probably an easy question, but i simply can't figure out, why
> this does not work:
> ...
> 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?

"Return" doesn't end the input. Try Control-D, which should work on
Linux at least (it send end-of-file).

  $ runhaskell test.hs
  hello, world
  ["hello"," world\n"]

More information about the Beginners mailing list