diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2018-06-16 23:30:26 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2018-06-18 08:23:17 +0100 |
commit | 850ae8c5343b46ce519a35dd9526d7d6f9454455 (patch) | |
tree | 98626d7f8d666e7f04143c68d7454193b19b2478 /compiler/typecheck/TcTyClsDecls.hs | |
parent | d6216443c61cee94d8ffc31ca8510a534d9406b9 (diff) | |
download | haskell-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.hs | 3 |
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, |