From 0043e4e027148be411b18425380d4f42496d89be Mon Sep 17 00:00:00 2001 From: erkok Date: Fri, 27 Sep 2002 17:12:23 +0000 Subject: [PATCH] [project @ 2002-09-27 17:12:23 by erkok] make sure we get the name right when we call doStmtListErr --- ghc/compiler/rename/RnExpr.lhs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ghc/compiler/rename/RnExpr.lhs b/ghc/compiler/rename/RnExpr.lhs index 299bb31..66ec772 100644 --- a/ghc/compiler/rename/RnExpr.lhs +++ b/ghc/compiler/rename/RnExpr.lhs @@ -286,7 +286,7 @@ rnExpr e@(HsDo do_or_lc stmts _ _ src_loc) -- Check the statement list ends in an expression case last stmts' of { ResultStmt _ _ -> returnM () ; - _ -> addErr (doStmtListErr "do" e) + _ -> addErr (doStmtListErr (binder_name do_or_lc) e) } `thenM_` -- Generate the rebindable syntax for the monad @@ -305,6 +305,9 @@ rnExpr e@(HsDo do_or_lc stmts _ _ src_loc) syntax_names MDoExpr = monadNames ++ [mfixName] syntax_names other = [] + binder_name MDoExpr = "mdo" + binder_name other = "do" + rnExpr (ExplicitList _ exps) = rnExprs exps `thenM` \ (exps', fvs) -> returnM (ExplicitList placeHolderType exps', fvs `addOneFV` listTyCon_name) -- 1.7.10.4