From: erkok Date: Fri, 27 Sep 2002 17:12:23 +0000 (+0000) Subject: [project @ 2002-09-27 17:12:23 by erkok] X-Git-Tag: Approx_11550_changesets_converted~1618 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=0043e4e027148be411b18425380d4f42496d89be;p=ghc-hetmet.git [project @ 2002-09-27 17:12:23 by erkok] make sure we get the name right when we call doStmtListErr --- 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)