Improve an error message; fixes #984
authorIan Lynagh <ian@well-typed.com>
Fri, 1 Feb 2013 15:23:39 +0000 (15:23 +0000)
committerIan Lynagh <ian@well-typed.com>
Fri, 1 Feb 2013 15:34:33 +0000 (15:34 +0000)
commitd2169af1b312c698ade627c26416a7527f1c46b1
treea3ac015e34f2ac11502ea357fb20c91f2cdd95e2
parent329c6cbdba84657b32c3049f3f73d89d475b4cad
Improve an error message; fixes #984

This code:
    f _ = do
            x <- computation
            case () of
                    _ ->
                            result <- computation
                            case () of () -> undefined
Now gives this error:
    Parse error in pattern: case () of { _ -> result }
    Possibly caused by a missing 'do'?
compiler/parser/Parser.y.pp
compiler/parser/RdrHsSyn.lhs