[commit: ghc] master: Parse error: suggest brackets and indentation. (b2e8936)
Paolo Capriotti
p.capriotti at gmail.com
Fri Jun 29 20:55:14 CEST 2012
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/b2e89367ff030d1c64a20dfc06be03fe8840d982
>---------------------------------------------------------------
commit b2e89367ff030d1c64a20dfc06be03fe8840d982
Author: Eric Kow <eric.kow at gmail.com>
Date: Wed Jun 27 12:59:59 2012 +0100
Parse error: suggest brackets and indentation.
I have observed that whenever GHC tells me that I have possibly
incorrect indentation, the real problem is often that I forgot
to close some sort of bracket.
>---------------------------------------------------------------
compiler/parser/Lexer.x | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/compiler/parser/Lexer.x b/compiler/parser/Lexer.x
index 116db25..114f7f6 100644
--- a/compiler/parser/Lexer.x
+++ b/compiler/parser/Lexer.x
@@ -2002,7 +2002,7 @@ srcParseErr
-> MsgDoc
srcParseErr buf len
= hcat [ if null token
- then ptext (sLit "parse error (possibly incorrect indentation)")
+ then ptext (sLit "parse error (possibly incorrect indentation or mismatched brackets)")
else hcat [ptext (sLit "parse error on input "),
char '`', text token, char '\'']
]
More information about the Cvs-ghc
mailing list