WIP: Zap coercions (take 2)
This MR, based heavily on !611 (closed), is SPJ's take on coercion zapping.
The basic approach remains the same: add a UnivProv for a zapped coercion, controlled by -ddrop-coercions. Particular features:
-
A zapped coercion is born in one place only: in GHC.Tc.Utils.Zonk, when zonking a coercion. By that time all coercion holes are filled in, so there is no issue about looking for free holes.
-
Flattening and solving are unaffected. They'll allocate coercions -- but my plan (not yet brought to fruition) is that they are never traversed when we have -ddrop-coercions
-
There will, therefore, be no perf gain in the type checker; but the entire rest of the compiler will benefit.
Fixes #8095.
Edited by Ben Gamari