Opened 4 years ago

Closed 4 years ago

#11734 closed task (duplicate)

coercionKind and coercionKindRole do potentially inefficient repeated substitutions

Reported by: niteria Owned by:
Priority: normal Milestone:
Component: Compiler Version: 8.1
Keywords: Cc: simonpj, goldfire
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

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.

Change History (1)

comment:1 Changed 4 years ago by goldfire

Resolution: duplicate
Status: newclosed

I'm arbitrarily deciding #11735 as the canonical home for this idea.

Note: See TracTickets for help on using tickets.