Skip to content

Add covering function parameter patterns #3

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

Open
J3RN opened this issue Nov 26, 2024 · 0 comments
Open

Add covering function parameter patterns #3

J3RN opened this issue Nov 26, 2024 · 0 comments

Comments

@J3RN
Copy link
Owner

J3RN commented Nov 26, 2024

I think the only covering patterns are

  • variable (e.g. a)
  • record (e.g. {foo: foo})

The primitives (Int, Float, Char, and String) cannot have covering patterns; nor can ADTs with multiple constructors (including Lists). I could add pattern support for ADTs with only a single constructor, but this feels like it would be an incoherent addition; reconsider later.

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

No branches or pull requests

1 participant