((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
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)
:: 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
-> [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.