The Do-Let-Braces problem

Paul Hudak paul.hudak@yale.edu
Thu, 15 Feb 2001 09:07:58 -0500


> fb =
>     do {
>         putStr "Enter Data: ";
>         line <- getLine;
>         let line2 = line;
>         putStr line2;
>        }

I suggest doing this:

> fb =
>     do { putStr "Enter Data: "
>        ; line <- getLine
>        ; let line2 = line
>        ; putStr line2
>        }

which looks nicer and has the advantage of being much easier to keep
track of where the semicolons are.

  -Paul