Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor variance operations. WHAT A MESS!
There's so much to clean up here. This change completely reworks variance operations. Notably, the union operator is gone, a product operator has been introduced, and natural invariants like depth now produce detailed bounds! This kicked up a lot of dust and a lot of questions... there's some serious refactoring and reorganization to do here. However, this codifies a more complete variance algebra and puts things in a better place for determining exhaustiveness. Bounds and exhaustiveness are important for matching, as they prevent unnecessary reads. Depth bounds can prevent reads beyond the maximum depth of an expression and exhaustiveness can prevent reads of directory trees that can be safely ignored when a pattern is used as a negation. The more generally variance can be reliably queried, the less necessary it is to use bespoke code that must query token trees **before** applying combinators. There's much to solve regarding the exhaustiveness of alternations. Let's get false positives fixed and get this cleaned up.
- Loading branch information