-
Notifications
You must be signed in to change notification settings - Fork 44
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
Constructors that require arguments shouldn't be in patterns without arguments #1309
Comments
hmm.. would need to decide what the error should be. the example shown doesn't seem fatally problematic, in that even if someone believed X gets bound by the let, it would still have the same result. but if the type had another constructor say Y of the same type, then it would be more confusing. in principle though in such cases would have refutable pattern errors, assuming it's possible to do refutability for arrow typed things |
probably just an arity error for constructors in patterns would do it? |
not sure we need any more information. we know constructor arities from types in ctx. so:
|
This example should ideally have a static error on the X because it doesn't have an argument.
@disconcision I wonder if you have any ideas how to do this?
The text was updated successfully, but these errors were encountered: