From bb8335796f5a6679849f7fae5ad4dcbb717e9755 Mon Sep 17 00:00:00 2001 From: simonpj Date: Tue, 24 May 2005 09:38:29 +0000 Subject: [PATCH] [project @ 2005-05-24 09:38:29 by simonpj] Yet another wibble to the GHCi top-level interaction story; avoid dup error messages --- ghc/compiler/typecheck/TcRnDriver.lhs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ghc/compiler/typecheck/TcRnDriver.lhs b/ghc/compiler/typecheck/TcRnDriver.lhs index 31d832e..66f3f95 100644 --- a/ghc/compiler/typecheck/TcRnDriver.lhs +++ b/ghc/compiler/typecheck/TcRnDriver.lhs @@ -962,7 +962,10 @@ mkPlan (L loc (ExprStmt expr _ _)) -- An expression typed at the prompt -- If not, fail; if so, try to print it. -- The two-step process avoids getting two errors: one from -- the expression itself, and one from the 'print it' part - do { tcGhciStmts [let_stmt]; tcGhciStmts [let_stmt, print_it] } + -- This two-step story is very clunky, alas + do { checkNoErrs (tcGhciStmts [let_stmt]) + --- checkNoErrs defeats the error recovery of let-bindings + ; tcGhciStmts [let_stmt, print_it] } ]} mkPlan stmt@(L loc (BindStmt {})) -- 1.7.10.4