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

Improve pattern-matchings #206

Merged
merged 3 commits into from
May 31, 2022
Merged

Conversation

paulpatault
Copy link
Contributor

@paulpatault paulpatault commented May 28, 2022

@pascutto pascutto linked an issue May 28, 2022 that may be closed by this pull request
@paulpatault paulpatault force-pushed the pattern-guards branch 3 times, most recently from 216f4ff to fd7fd31 Compare May 30, 2022 15:47
- added exception for ambiguous patterns
- added exhaustivness check
- added test files
@paulpatault paulpatault marked this pull request as ready for review May 31, 2022 09:40
Copy link
Contributor

@pascutto pascutto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this!
Just a few minor suggestions before we merge :)
Can you please also add a changelog entry? Something like "Added guards in pattern-matchings." (or whatever you think describes it best).

src/warnings.ml Outdated Show resolved Hide resolved
test/patterns/negative/ambiguous.mli Show resolved Hide resolved
src/patmat.ml Outdated Show resolved Hide resolved
src/uparser.mly Outdated Show resolved Hide resolved
src/uparser.mly Outdated Show resolved Hide resolved
src/uparser.mly Outdated Show resolved Hide resolved
src/uparser.mly Outdated Show resolved Hide resolved
@pascutto
Copy link
Contributor

Thanks a lot!

@pascutto pascutto merged commit 281c169 into ocaml-gospel:main May 31, 2022
@paulpatault paulpatault deleted the pattern-guards branch May 31, 2022 12:25
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.

disallow ambiguous or-patterns under guards
2 participants