"Jeffrey R. Lewis" <[EMAIL PROTECTED]> writes:
> I thought the if-the-else proposal seemed odd until I followed the link
> and read the exact proposal. Simon: your if-then-else example on the
> Standard Haskell page seems at odds with the actual proposal (e.g. isn't
> the point that the `else' itself needn't be indented?)
That's right - there seems to be a slight bug in Simon's example on
the web page, which just goes to show what a sticky issue layout is.
I think the correct example is
do
putStr "hello"
if .... then
putStr "goodbye"
else do
putStr "carry"
putStr "on"
the point is that the 'else' needn't be indented. This would be
possible too:
do
print n
putStr " green bottle"
if n > 1 then
putStr "s"
else
return ()
putStr " sitting on a wall"
Cheers,
Simon
--
Simon Marlow [EMAIL PROTECTED]
University of Glasgow http://www.dcs.gla.ac.uk/~simonm/
finger for PGP public key