summaryrefslogtreecommitdiff
path: root/compiler/typecheck/TcTyClsDecls.hs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2018-06-16 23:30:26 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2018-06-18 08:23:17 +0100
commit850ae8c5343b46ce519a35dd9526d7d6f9454455 (patch)
tree98626d7f8d666e7f04143c68d7454193b19b2478 /compiler/typecheck/TcTyClsDecls.hs
parentd6216443c61cee94d8ffc31ca8510a534d9406b9 (diff)
downloadhaskell-850ae8c5343b46ce519a35dd9526d7d6f9454455.tar.gz
Two small refactorings
* Define Type.substTyVarBndrs, and use it * Rename substTyVarBndrCallback to substTyVarBndrUsing, and other analogous higher order functions. I kept stumbling over the name.
Diffstat (limited to 'compiler/typecheck/TcTyClsDecls.hs')
-rw-r--r--compiler/typecheck/TcTyClsDecls.hs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/typecheck/TcTyClsDecls.hs b/compiler/typecheck/TcTyClsDecls.hs
index 0e095de2ea..b90f1be1f9 100644
--- a/compiler/typecheck/TcTyClsDecls.hs
+++ b/compiler/typecheck/TcTyClsDecls.hs
@@ -2147,8 +2147,7 @@ rejigConRes tmpl_bndrs res_tmpl dc_inferred_tvs dc_specified_tvs res_ty
tcMatchTy res_tmpl res_ty
= let (univ_tvs, raw_eqs, kind_subst) = mkGADTVars tmpl_tvs dc_tvs subst
raw_ex_tvs = dc_tvs `minusList` univ_tvs
- (arg_subst, substed_ex_tvs)
- = mapAccumL substTyVarBndr kind_subst raw_ex_tvs
+ (arg_subst, substed_ex_tvs) = substTyVarBndrs kind_subst raw_ex_tvs
-- After rejigging the existential tyvars, the resulting substitution
-- gives us exactly what we need to rejig the user-written tyvars,