X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Frename%2FRnExpr.lhs;h=a269dd509812d99897813330ff2276eeb76f8820;hp=4ce71826f66ee8bfb10376f02965c5facbc9449c;hb=df8b00e014ad8280354dd3fab6e6df0a52377627;hpb=f04dead93a15af1cb818172f207b8a81d2c81298 diff --git a/compiler/rename/RnExpr.lhs b/compiler/rename/RnExpr.lhs index 4ce7182..a269dd5 100644 --- a/compiler/rename/RnExpr.lhs +++ b/compiler/rename/RnExpr.lhs @@ -950,7 +950,7 @@ rn_rec_stmt_lhs _ (L _ (LetStmt binds@(HsIPBinds _))) = failWith (badIpBinds (ptext (sLit "an mdo expression")) binds) rn_rec_stmt_lhs fix_env (L loc (LetStmt (HsValBinds binds))) - = do binds' <- rnValBindsLHS fix_env binds + = do (_bound_names, binds') <- rnValBindsLHS fix_env binds return [(L loc (LetStmt (HsValBinds binds')), -- Warning: this is bogus; see function invariant emptyFVs @@ -975,15 +975,14 @@ rn_rec_stmt_lhs _ (L _ (LetStmt EmptyLocalBinds)) rn_rec_stmts_lhs :: MiniFixityEnv -> [LStmt RdrName] -> RnM [(LStmtLR Name RdrName, FreeVars)] -rn_rec_stmts_lhs fix_env stmts = - let boundNames = collectLStmtsBinders stmts - doc = text "In a recursive mdo-expression" - in do - -- First do error checking: we need to check for dups here because we - -- don't bind all of the variables from the Stmt at once - -- with bindLocatedLocals. - checkDupRdrNames doc boundNames - mapM (rn_rec_stmt_lhs fix_env) stmts `thenM` \ ls -> return (concat ls) +rn_rec_stmts_lhs fix_env stmts + = do { let boundNames = collectLStmtsBinders stmts + -- First do error checking: we need to check for dups here because we + -- don't bind all of the variables from the Stmt at once + -- with bindLocatedLocals. + ; checkDupRdrNames boundNames + ; ls <- mapM (rn_rec_stmt_lhs fix_env) stmts + ; return (concat ls) } -- right-hand-sides