Skip to content
Snippets Groups Projects
Commit 5601b9e2 authored by Matthías Páll Gissurarson's avatar Matthías Páll Gissurarson Committed by Marge Bot
Browse files

Speed up valid hole-fits by adding early abort and checks.

By adding an early abort flag in `TcSEnv`, we can fail fast in the presence of
insoluble constraints. This helps us avoid a lot of work in valid hole-fits, and
we geta massive speed-up by avoiding a lot of useless work solving constraints that
never come into play.

Additionally, we add a simple check for degenerate hole types, such as
when the type of the hole is an immutable type variable (as is the case
when the hole is completely unconstrained). Then the only valid fits are
the locals, so we can ignore the global candidates.

This fixes #16875
parent 48b0f17a
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment