Core lint failure when optimizing coercions in branched axioms
|Reported by:||goldfire||Owned by:||goldfire|
|Type of failure:||Compile-time crash||Test Case:|
|Related Tickets:||Differential Rev(s):|
The attached code causes the failure.
Core Lint correctly checks branched axioms for internal consistency -- when using branch n of an axiom, we must ensure that no branch m < n can possibly apply, no matter what the instantiation for any type variables in the branch may be. However, the coercion optimizer does not respect this property. It will replace coercions used in axioms with equivalent coercions that do not respect this internal consistency property. Everything works out OK in the end (without -dcore-lint, the file compiles and runs correctly), but we go through an invalid state on the way.
In particular, the TrPushAx rules are to blame.
I'm not sure what the best fix for this is, but it seems to be my job to find it.