[commit: ghc] master: Improve an error message; fixes #984 (d2169af)
Ian Lynagh
igloo at earth.li
Fri Feb 1 17:18:20 CET 2013
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/d2169af1b312c698ade627c26416a7527f1c46b1
>---------------------------------------------------------------
commit d2169af1b312c698ade627c26416a7527f1c46b1
Author: Ian Lynagh <ian at well-typed.com>
Date: Fri Feb 1 15:23:39 2013 +0000
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 | 22 +++++----
compiler/parser/RdrHsSyn.lhs | 108 ++++++++++++++++++++++--------------------
2 files changed, 70 insertions(+), 60 deletions(-)
Diff suppressed because of size. To see it, use:
git show d2169af1b312c698ade627c26416a7527f1c46b1
More information about the ghc-commits
mailing list