From: David Turner Sent: Tuesday, November 15, 2016 1:14 PM To: Haskell Cafe Subject: Re: [Haskell-cafe] commenting out a line of code |
The answer is very simple ;-} The report says that after a do the first symbol to encounter determines the indentation level; so putStrLn “done” is part of the else branch. Obvious, isn’t it.
I'm not quite sure, but I'd guess either one of1.) It does not compile at all because of suspicious indentation2.) It will just print "A" but not "done" because that is considered beeing in the else-branch.