[GHC] #11735: Optimize coercionKind
GHC
ghc-devs at haskell.org
Mon Mar 21 17:13:33 UTC 2016
#11735: Optimize coercionKind
-------------------------------------+-------------------------------------
Reporter: goldfire | Owner:
Type: task | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.3
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
Currently, the `ForAllCo` case of `coercionKind` does an inefficient one-
variable substitution. This could be improved by looking for nested
`ForAllCo`s.
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.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11735>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list