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

Pattern guards #1

Open
sim642 opened this issue May 1, 2022 · 0 comments
Open

Pattern guards #1

sim642 opened this issue May 1, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@sim642
Copy link
Owner

sim642 commented May 1, 2022

Haskell has another feature called "pattern guards":

There are severely outdated ports of them to OCaml:

There are also OCaml RFCs:

Although this ppx is currently explicitly for view patterns, it might be relatively easy to swallow ppx_pattern_guard functionality for transforming matches while sharing some of the underlying infrastructure. Neither feature subsumes the other, but there are big similarities, so it might be worth generalizing this ppx.

@sim642 sim642 added the enhancement New feature or request label May 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant