[Haskell-beginners] IO - getContents - putStrLn

Brandon Allbery allbery.b at gmail.com
Sat Jun 16 20:24:56 CEST 2012


On Sat, Jun 16, 2012 at 2:03 PM, 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?
>

At a guess, your "split" is too strict and requires the entire input in
order to do anything, so you'd need control-D on Unix or control-Z on
Windows to mark the end of the input stream.

You might prefer to use the functions from the "split" package on Hackage
(cabal install split) which are appropriately lazy.

-- 
brandon s allbery                                      allbery.b at gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20120616/7009e89c/attachment.htm>


More information about the Beginners mailing list