- ictxt' = ictxt { ic_type_env = type_env'
- , ic_tyvars = foldl' delVarSetByKey
- (ic_tyvars ictxt)
- subst_dom }
+ subst_ran= varEnvElts$ getTvSubstEnv subst
+ new_tvs = [ tv | Just tv <- map getTyVar_maybe subst_ran]
+ ic_tyvars'= (`delVarSetListByKey` subst_dom)
+ . (`extendVarSetList` new_tvs)
+ $ ic_tyvars ictxt
+ ictxt' = ictxt { ic_tmp_ids = ids'
+ , ic_tyvars = ic_tyvars' }