I have entered some code in ghci
, similar to this:
main = do { a <- getLine ; let b = "Hello " ++ a ; putStrLn b }
However, I get this error:
<interactive>:1:63: error: parse error on input `}'
In previous versions of Haskell/GHC, I remember this working just fine - it was even explicitly said that, in do
blocks, you don't need the in
keyword. Yet, the only way to get this to work seems to be:
main = do { a <- getLine ; let b = "Hello " ++ a in putStrLn b }
which doesn't produce this error.
Has this been removed? If so, do I need a second do
block inside the let in
expression?