[Haskell-cafe] Small syntax question
Arthur Baars
arthurb at cs.uu.nl
Mon Feb 13 11:39:38 EST 2006
The problem is that the semicolon after "let a = 3" is consumed as part
of the let-declaration.
To make sure that the semicolon is not parsed as part of the let, you
need to indent it less than the variable "a".
For example:
module Main where
main = do {
let a = 3
; return ();
};
Arthur
> Why isn't this one [valid]?
>
> module Main where
> main = do {
> let a = 3;
> return ();
> };
>
More information about the Haskell-Cafe
mailing list