From 14ec68724389d204e9121361e015ab776f348c5e Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft.com" Date: Tue, 12 Dec 2006 09:25:56 +0000 Subject: [PATCH] Fix up yesterdays commit to TcSimplify; fixes broken HEAD --- compiler/typecheck/TcRnDriver.lhs | 3 +-- compiler/typecheck/TcRules.lhs | 4 +--- compiler/typecheck/TcSimplify.lhs | 4 ++-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/compiler/typecheck/TcRnDriver.lhs b/compiler/typecheck/TcRnDriver.lhs index 88dfe81..83d8321 100644 --- a/compiler/typecheck/TcRnDriver.lhs +++ b/compiler/typecheck/TcRnDriver.lhs @@ -1038,9 +1038,8 @@ tcRnExpr hsc_env ictxt rdr_expr ((tc_expr, res_ty), lie) <- getLIE (tcInferRho rn_expr) ; ((qtvs, _, dict_ids), lie_top) <- getLIE (tcSimplifyInfer smpl_doc (tyVarsOfType res_ty) lie) ; tcSimplifyInteractive lie_top ; - qtvs' <- mappM zonkQuantifiedTyVar qtvs ; - let { all_expr_ty = mkForAllTys qtvs' $ + let { all_expr_ty = mkForAllTys qtvs $ mkFunTys (map idType dict_ids) $ res_ty } ; zonkTcType all_expr_ty diff --git a/compiler/typecheck/TcRules.lhs b/compiler/typecheck/TcRules.lhs index 28be06e..25abd58 100644 --- a/compiler/typecheck/TcRules.lhs +++ b/compiler/typecheck/TcRules.lhs @@ -82,11 +82,9 @@ tcRule (HsRule name act vars lhs fv_lhs rhs fv_rhs) tcSimplifyInferCheck loc forall_tvs lhs_dicts rhs_lie `thenM` \ (forall_tvs1, rhs_binds) -> - zonkQuantifiedTyVars forall_tvs1 `thenM` \ forall_tvs2 -> - -- This zonk is exactly the same as the one in TcBinds.generalise returnM (HsRule name act - (map (RuleBndr . noLoc) (forall_tvs2 ++ tpl_ids)) -- yuk + (map (RuleBndr . noLoc) (forall_tvs1 ++ tpl_ids)) -- yuk (mkHsDictLet lhs_binds lhs') fv_lhs (mkHsDictLet rhs_binds rhs') fv_rhs) diff --git a/compiler/typecheck/TcSimplify.lhs b/compiler/typecheck/TcSimplify.lhs index 1689dab..451e3b1 100644 --- a/compiler/typecheck/TcSimplify.lhs +++ b/compiler/typecheck/TcSimplify.lhs @@ -657,7 +657,7 @@ tcSimplifyInfer :: SDoc -> TcTyVarSet -- fv(T); type vars -> [Inst] -- Wanted - -> TcM ([TcTyVar], -- Tyvars to quantify (zonked) + -> TcM ([TcTyVar], -- Tyvars to quantify (zonked and quantified) [Inst], -- Dict Ids that must be bound here (zonked) TcDictBinds) -- Bindings -- Any free (escaping) Insts are tossed into the environment @@ -1172,7 +1172,7 @@ tcSimplifyRestricted -- Used for restricted binding groups -> [Name] -- Things bound in this group -> TcTyVarSet -- Free in the type of the RHSs -> [Inst] -- Free in the RHSs - -> TcM ([TyVar], -- Tyvars to quantify (zonked) + -> TcM ([TyVar], -- Tyvars to quantify (zonked and quantified) TcDictBinds) -- Bindings -- tcSimpifyRestricted returns no constraints to -- quantify over; by definition there are none. -- 1.7.10.4