X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftypecheck%2FTcHsSyn.lhs;h=0ca5d6035ed330d9f3fe4844f9484d46aaa38d44;hb=338be3e67180ff09030e665cb98f748317f46ce6;hp=494b0d693ccc3efc8e8f94f8a9fe2be6794c9edf;hpb=cbb5beb0ecef58ae6e47fa62e144a0855644f50a;p=ghc-hetmet.git diff --git a/ghc/compiler/typecheck/TcHsSyn.lhs b/ghc/compiler/typecheck/TcHsSyn.lhs index 494b0d6..0ca5d60 100644 --- a/ghc/compiler/typecheck/TcHsSyn.lhs +++ b/ghc/compiler/typecheck/TcHsSyn.lhs @@ -315,7 +315,20 @@ zonkBinds env (MonoBind bind sigs is_rec) zonkMonoBinds env1 bind `thenM` \ (new_bind, new_ids) -> returnM (env1, new_bind, new_ids) ) `thenM` \ (env1, new_bind, _) -> - returnM (env1, mkMonoBind new_bind [] is_rec) + returnM (env1, mkMonoBind is_rec new_bind) + +zonkBinds env (IPBinds binds is_with) + = mappM zonk_ip_bind binds `thenM` \ new_binds -> + let + env1 = extendZonkEnv env (map (ipNameName . fst) new_binds) + in + returnM (env1, IPBinds new_binds is_with) + where + zonk_ip_bind (n, e) + = mapIPNameTc (zonkIdBndr env) n `thenM` \ n' -> + zonkExpr env e `thenM` \ e' -> + returnM (n', e') + --------------------------------------------- zonkMonoBinds :: ZonkEnv -> TcMonoBinds @@ -497,19 +510,6 @@ zonkExpr env (HsLet binds expr) zonkExpr new_env expr `thenM` \ new_expr -> returnM (HsLet new_binds new_expr) -zonkExpr env (HsWith expr binds is_with) - = mappM zonk_ip_bind binds `thenM` \ new_binds -> - let - env1 = extendZonkEnv env (map (ipNameName . fst) new_binds) - in - zonkExpr env1 expr `thenM` \ new_expr -> - returnM (HsWith new_expr new_binds is_with) - where - zonk_ip_bind (n, e) - = mapIPNameTc (zonkIdBndr env) n `thenM` \ n' -> - zonkExpr env e `thenM` \ e' -> - returnM (n', e') - zonkExpr env (HsDo do_or_lc stmts ids ty src_loc) = zonkStmts env stmts `thenM` \ new_stmts -> zonkTcTypeToType env ty `thenM` \ new_ty ->