This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
minimal documentation on injectivity #7550
Comments
Hi, I'm an Outreachy applicant. Could this be my first contribution? |
Hi @nobrowser: yes it could, but I think that writing documentation on this point requires a good familiarity with the OCaml type system (it's a newcomer job because it does not require familiarity with the compiler implementation). If you are not familiar with GADTs or the behavior of the example given above, I would maybe recommend picking an easier task. |
Hmm. Has someone uttered my name? That is not an action one should take lightly! AAAARRRRGGHHHHH! |
Indeed, I meant @notemaster; sorry @nobrowser :-) |
Okay, I did spend a bit of time familiarizing myself with certain examples of GADT's and I have some background in Type theory but I'm not super solid on everything thats going here. I'll look at another job then but keep this one on the backburner. Thanks @gasche! |
I have moved the issue to the advanced section of |
If I understand this correctly, this behavior is because in the first case the type is assumed to be non-injective, thus it unifies |
Note: there is now a proposed PR, #9500, that introduces explicit annotations for injective type parameters ( |
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. |
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. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Original bug ID: 7550
Reporter: @Octachron
Status: acknowledged (set by @Octachron on 2017-07-11T19:44:17Z)
Resolution: open
Priority: low
Severity: feature
Category: documentation
Tags: manual, junior_job
Monitored by: @gasche
Bug description
Injectivity is never mentioned in the manual. Consequently, there are no explanation on why the "B" case cannot be refuted in
whereas the apparently similar refutation case works fine:
Adding a short example and explanation in the GADTs section of the language extension chapter would make the previous example less mysterious.
The text was updated successfully, but these errors were encountered: