Commit d27da536 authored by niteria's avatar niteria

Replace mkTvSubstPrs (a `zip` b) with zipTvSubst a b

It's just a small cleanup. There should be no change in

Test Plan: ./validate --slow

Reviewers: austin, bgamari, simonpj

Reviewed By: simonpj

Subscribers: thomie, simonmar

Differential Revision:
parent b565830d
......@@ -563,7 +563,7 @@ mkDataConRep dflags fam_envs wrap_name mb_bangs data_con
mk_boxer :: [Boxer] -> DataConBoxer
mk_boxer boxers = DCB (\ ty_args src_vars ->
do { let (ex_vars, term_vars) = splitAtList ex_tvs src_vars
subst1 = mkTvSubstPrs (univ_tvs `zip` ty_args)
subst1 = zipTvSubst univ_tvs ty_args
subst2 = extendTCvSubstList subst1 ex_tvs
(mkTyVarTys ex_vars)
; (rep_ids, binds) <- go subst2 boxers term_vars
......@@ -623,7 +623,7 @@ dsExpr expr@(RecordUpd { rupd_expr = record_expr, rupd_flds = fields
mk_alt upd_fld_env con
= do { let (univ_tvs, ex_tvs, eq_spec,
prov_theta, _req_theta, arg_tys, _) = conLikeFullSig con
subst = mkTvSubstPrs (univ_tvs `zip` in_inst_tys)
subst = zipTvSubst univ_tvs in_inst_tys
-- I'm not bothering to clone the ex_tvs
; eqs_vars <- mapM newPredVarDs (substTheta subst (eqSpecPreds eq_spec))
......@@ -1011,7 +1011,7 @@ addDataConStupidTheta data_con inst_tys
-- The origin should always report "occurrence of C"
-- even when C occurs in a pattern
stupid_theta = dataConStupidTheta data_con
tenv = mkTvSubstPrs (dataConUnivTyVars data_con `zip` inst_tys)
tenv = zipTvSubst (dataConUnivTyVars data_con) inst_tys
-- NB: inst_tys can be longer than the univ tyvars
-- because the constructor might have existentials
inst_theta = substTheta tenv stupid_theta
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment