List indenting in case fails
The following code fails to parse
module Temp where
t = case [1..2] of
[ 1
, 2
] -> True
_ -> False
with
Temp.hs:5:9:
parse error (possibly incorrect indentation or mismatched brackets)
Which relates to the line , 2
. Indenting both that line and the next one is needed to parse the module. This is contrary to what I suspected. As this vertical layout for lists is allowed as expression, I would also expect it to work for patterns.
Trac metadata
Trac field | Value |
---|---|
Version | 7.8.2 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |