[commit: ghc] master: Replace some pushTcLevelM's with pushTcLevelM_ (611f998)
git at git.haskell.org
git at git.haskell.org
Tue Feb 21 14:54:11 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/611f998fd545b45167170d9e60b7d9147178f0a1/ghc
>---------------------------------------------------------------
commit 611f998fd545b45167170d9e60b7d9147178f0a1
Author: Ryan Scott <ryan.gl.scott at gmail.com>
Date: Tue Feb 21 09:51:43 2017 -0500
Replace some pushTcLevelM's with pushTcLevelM_
These occurrences of pushTcLevelM weren't using the resulting TcLevel,
so they can be replaced with the (ostensibly more efficient) pushTcLevelM_.
No change in behavior.
>---------------------------------------------------------------
611f998fd545b45167170d9e60b7d9147178f0a1
compiler/typecheck/TcDerivInfer.hs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/compiler/typecheck/TcDerivInfer.hs b/compiler/typecheck/TcDerivInfer.hs
index a28b0bc..e0d46dd 100644
--- a/compiler/typecheck/TcDerivInfer.hs
+++ b/compiler/typecheck/TcDerivInfer.hs
@@ -246,7 +246,7 @@ inferConstraintsDAC cls tvs inst_tys
= do { let gen_dms = [ (sel_id, dm_ty)
| (sel_id, Just (_, GenericDM dm_ty)) <- classOpItems cls ]
- ; (theta_origins, _lvl) <- pushTcLevelM (mapM do_one_meth gen_dms)
+ ; theta_origins <- pushTcLevelM_ (mapM do_one_meth gen_dms)
-- Yuk: the pushTcLevel is to match the one wrapping the call
-- to mk_wanteds in simplifyDeriv. If we omit this, the
-- unification variables will wrongly be untouchable.
@@ -268,8 +268,8 @@ inferConstraintsDAC cls tvs inst_tys
gen_dm_ty' = substTyWith cls_tvs inst_tys gen_dm_ty
(dm_tvs, dm_theta, dm_tau) = tcSplitNestedSigmaTys gen_dm_ty'
- ; ((subst, _meta_tvs), _lvl) <- pushTcLevelM $
- newMetaTyVarsX empty_subst dm_tvs
+ ; (subst, _meta_tvs) <- pushTcLevelM_ $
+ newMetaTyVarsX empty_subst dm_tvs
-- Yuk: the pushTcLevel is to match the one in mk_wanteds
-- simplifyDeriv. If we don't, the unification variables
-- will bogusly be untouchable.
More information about the ghc-commits
mailing list