Skip to content

coercionKind and coercionKindRole do potentially inefficient repeated substitutions

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 aForallCo so we do inspect the inscope set.

See Type.piResultTys.

Trac metadata
Trac field Value
Version 8.1
Type Task
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC goldfire, simonpj
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information