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
Do not display warning 40 in a non-ambiguous match #6731
Comments
Comment author: @lpw25 I suspect this gets quite tricky for nested patterns, which is why we give no special treatment to sibling patterns (e.g. there was never any equivalent to the { Foo.bar; baz } record syntax). For similar reasons patterns like this will give a principality warning if the patterns require disambiguation. |
Comment author: @gasche
Barring GADTs, is there a fundamental reason why that would be trickier than nested record constructions? |
Comment author: @lpw25
I'm not sure what you mean by "nested record constructors". |
Comment author: @gasche It seems that { x = { a; b }; y; } displays the same sort of (non-)difficulties as the clauses (X A -> ... | X B -> ... | Y -> ... ). |
Comment author: @lpw25
Well Whereas |
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc. |
I don't think this is going to change in the near future (nor do I think that it should). |
Yes, on reflection I agree that this would not be a desirable feature due to the complex rules that would be necessary for disambiguation. |
Original bug ID: 6731
Reporter: @whitequark
Status: acknowledged (set by @damiendoligez on 2014-12-23T17:01:55Z)
Resolution: open
Priority: normal
Severity: feature
Version: 4.02.1
Category: middle end (typedtree to clambda)
Monitored by: @gasche
Bug description
The following match contains no ambiguity:
However, warning 40 is still displayed.
The text was updated successfully, but these errors were encountered: