let form in do block requires in?
According to the 2010 Haskell spec the following should be equivalent: do1 = do { let x = 3.14 ; return x } and do2 = let x = 3.14 in do { return x }
But ghc 7.6.3 chokes on the first (do1) with "parse error on input '}'" On the other hand, if I use layout and set do3 = do
let x = 3.14 return x
there is no problem. Also, the compiler doesn't complain if I insert "in" in place of the semicolon in do1 (but this doesn't seem to follow the spec).
Trac metadata
Trac field | Value |
---|---|
Version | 7.6.3 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |