[Haskell-cafe] Newbie question about using WinGHCi

Christopher Tauss ctauss1 at gmail.com
Thu Jul 1 02:04:29 EDT 2010

Hello -

I just a day or so ago downloaded Hakell and am playing around with it, and
I came upon this problem with WinGHCi:

I am able to enter a multi-line "do" statement that works if I use brackets
and semi-colon like so:

Prelude> :{
Prelude| let main2 = do {
Prelude| putStrLn "Please enter your name: ";
Prelude| name <- getLine;
Prelude| putStrLn ("Hello, " ++ name ++ ", how are you?") }
Prelude| :}
Prelude> main2
Please enter your name:
Hello, CT, how are you?

Note there is no indentation.  This makes sense to me because the :{  :}
just take all the lines in between and make it one line.

But it seems to me to be IMPOSSIBLE to input this into WinGHCi using
indentation like most of the code samples seem to do.

Should I just be satisfied that it works using brackets/ semi-colons?  Or is
there something obvious that I am missing that allows for indentation?

Thanks in advance. It's issues lik this that keep me up into the depths of

Best Regards,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100701/c2663f00/attachment.html

More information about the Haskell-Cafe mailing list