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
Variance information is not properly propagated through functor applications #5984
Comments
Comment author: @garrigue This is well-known, long standing problems with variance and functors. Do you have a concrete example where it created problems ? |
Comment author: @xavierleroy I interpret the absence of discussion in the last two years as a "won't fix" decision. Correct? |
Comment author: @yallop This isn't causing problems for me in practice, so I'm happy for it to be closed. |
Comment author: @xavierleroy Thanks, Jeremy. Marking as "won't fix". |
Comment author: @garrigue Just for the record: this is not a definitive "won't fix". |
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. |
There is actually more and more pressure to do this, so I'm tempted of moving this PR from feature-wish to bug. |
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 keep it open, because this should be fixed eventually. |
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. |
Original bug ID: 5984
Reporter: @yallop
Assigned to: @garrigue
Status: confirmed (set by @garrigue on 2017-03-15T05:58:24Z)
Resolution: won't fix
Priority: normal
Severity: feature
Target version: later
Category: typing
Related to: #2696 #6492 #7212
Parent of: #5985 #7321
Monitored by: @lpw25
Bug description
Type constructors that pass transparently through functors lose certain variance information along the way. For example, the following program
is rejected with this error:
However, despite this error, the type that results from the functor application is actually marked as covariant, as illustrated by the fact that the following program is accepted:
The text was updated successfully, but these errors were encountered: