[commit: ghc] ghc-8.0: Replace mkTvSubstPrs (a `zip` b) with zipTvSubst a b (aeafaf6)
git at git.haskell.org
git at git.haskell.org
Thu Mar 24 00:52:35 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.0
Link : http://ghc.haskell.org/trac/ghc/changeset/aeafaf65b9f3d7763ebc1c595119b94553e4b4b0/ghc
>---------------------------------------------------------------
commit aeafaf65b9f3d7763ebc1c595119b94553e4b4b0
Author: Bartosz Nitka <niteria at gmail.com>
Date: Wed Feb 10 08:12:44 2016 -0800
Replace mkTvSubstPrs (a `zip` b) with zipTvSubst a b
It's just a small cleanup. There should be no change in
behaviour.
Test Plan: ./validate --slow
Reviewers: austin, bgamari, simonpj
Reviewed By: simonpj
Subscribers: thomie, simonmar
Differential Revision: https://phabricator.haskell.org/D1901
(cherry picked from commit d27da53652a6ba01c91856859a4be674fe3c835d)
>---------------------------------------------------------------
aeafaf65b9f3d7763ebc1c595119b94553e4b4b0
compiler/deSugar/DsExpr.hs | 2 +-
compiler/typecheck/TcPat.hs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/compiler/deSugar/DsExpr.hs b/compiler/deSugar/DsExpr.hs
index 6116578..8a64a68 100644
--- a/compiler/deSugar/DsExpr.hs
+++ b/compiler/deSugar/DsExpr.hs
@@ -624,7 +624,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))
diff --git a/compiler/typecheck/TcPat.hs b/compiler/typecheck/TcPat.hs
index e56bb20..53b8142 100644
--- a/compiler/typecheck/TcPat.hs
+++ b/compiler/typecheck/TcPat.hs
@@ -1017,7 +1017,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
More information about the ghc-commits
mailing list