Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow GADT constructors to introduce equations and existential types under or-patterns #2110
(This PR is the last part to be extracted from #1675.)
It adds limited support for GADTs under or-patterns (and nothing else): equations and existential types can be introduced in an or-pattern branch, but they are not accessible outside of that branch.
The implementation is straightforward, and it should be easier to reason about soundness than with the previous PR (which included many orthogonal changes).
Note: once again the calls to
@garrigue would you mind giving it a new look?
garrigue left a comment
Sorry for the long delay.
I have added some comments in the test file. I think it would be useful to document what looks strange there, as things to potentially straighten up in the future. I don't believe anything is directly related with this patch, but you have exerted some dark corners, like the way