From b40966bbca04ef735d3841def3d7684bc973a6c5 Mon Sep 17 00:00:00 2001
From: Eric Kow <eric.kow@gmail.com>
Date: Wed, 27 Jun 2012 12:59:59 +0100
Subject: [PATCH] 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 '\'']
     ]
-- 
1.7.7.1

