Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error flag for case expressions' associated DHExp #1154

Draft
wants to merge 2 commits into
base: haz3l-case-advanced-ui
Choose a base branch
from

Conversation

pigumar1
Copy link
Contributor

@pigumar1 pigumar1 commented Dec 21, 2023

This pull request aims to merge the three different case constructs in DHExp into one case construct.

The new approach will replace
DHExp.ConsistentCase(DHExp.case),
DHExp.InconsistentBranches(MetaVar.t, HoleInstanceId.t, DHExp.case),
DHExp.InexhaustiveCase(MetaVar.t, HoleInstanceId.t, DHExp.case) (added for #1124),
and DHExp.case.Case(t, list(rule), int)

with DHExp.Case(t, list(rule), int, option((MetaVar.t, HoleInstanceId.t))), in which the last parameter indicates whether the corresponding case expression is inconsistent.

Two concerns:

  • Do we need to preserve the ability to distinguish consistent/inconsistent case expressions with DHExp.constructor_string? If so, the new Case construct, as well as the function DHExp.constructor_string would be a little bit more complex.
  • Do we need to preserve the ability to have different inconsistent case expressions behave (dynamically) differently? If so, option might not be enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant