[GHC] #11734: coercionKind and coercionKindRole do potentially inefficient repeated substitutions

#11734: coercionKind and coercionKindRole do potentially inefficient repeated substitutions -------------------------------------+------------------------------------- Reporter: niteria | Owner: Type: task | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.1 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: -------------------------------------+------------------------------------- As pointed out by @simonpj in phab:D2024:
I hate the idea of substituting for a single type variable at a time. Its a recipe for non-linear behaviour. Maybe we should gather the foralls and the type args and try to do it all at once?
Anyway, that's not the fault of this patch, although this patch may make it worse. Because when substituting into a monotype, the inscope set is not used; but if we do it one at a time we substitute into a`ForallCo` so we do inspect the inscope set.
See Type.piResultTys.
-- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11734 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11734: coercionKind and coercionKindRole do potentially inefficient repeated substitutions -------------------------------------+------------------------------------- Reporter: niteria | Owner: Type: task | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.1 Resolution: duplicate | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by goldfire): * status: new => closed * resolution: => duplicate Comment: I'm arbitrarily deciding #11735 as the canonical home for this idea. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11734#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC