Optimize coercionKind
Currently, the ForAllCo case of coercionKind does an inefficient one-variable substitution. This could be improved by looking for nested ForAllCos.
Furthermore, perhaps we don't need an in-scope set and the full substitution machinery here. The subst is simply propagating the update of a tyvar's kind. No structural changes at all. No need for smart coercion constructors or other processing. So if we're going to optimize this, it might be worth making a specialized version of subst_ty and subst_co that operate over a VarEnv Var instead of a full substitution.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.10.3 |
| Type | Task |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |