diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2017-02-21 09:51:43 -0500 |
---|---|---|
committer | Ryan Scott <ryan.gl.scott@gmail.com> | 2017-02-21 09:51:47 -0500 |
commit | 611f998fd545b45167170d9e60b7d9147178f0a1 (patch) | |
tree | d2b3e47657433aecdbec6502799f711c7a973dda /compiler/typecheck/TcDerivInfer.hs | |
parent | 4080a63c510f13be22953383a07ce0cf2d29e17b (diff) | |
download | haskell-611f998fd545b45167170d9e60b7d9147178f0a1.tar.gz |
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.
Diffstat (limited to 'compiler/typecheck/TcDerivInfer.hs')
-rw-r--r-- | compiler/typecheck/TcDerivInfer.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/typecheck/TcDerivInfer.hs b/compiler/typecheck/TcDerivInfer.hs index a28b0bcf65..e0d46ddc15 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. |