Indentation requirements for parsing seem inconsistent
The "golden rule of indentation" does not seem to be strictly adhered to in all cases: there is an interaction between let/where clauses and do-notation that makes indentation requirements different in different situations:
Example 1, parsed successfully:
f = let y = do
Just 1
in y
Example 2, causes an error:
f = let y =
Just 1
in y
Example 3, causes an error:
f = do
Just 1
This behavior seems inconsistent to me.
See also http://stackoverflow.com/questions/32531508/haskell-parse-error-from-incorrect-indent.
Trac metadata
Trac field | Value |
---|---|
Version | 7.10.2 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler (Parser) |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |