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
Type equality broken for conjunctive polymorphic variant tags #5927
Comments
Comment author: @lpw25 I've attached a new fix that is probably more consistent with other behaviour. |
Comment author: @garrigue Actually, the failure in this case is intentional, as this conjunction is clearly impossible. |
Comment author: @lpw25 Even if the conjunction is impossible, the type itself is valid and should at least be considered equivalent to itself. Also, the current error is unclear and only occurs during module inclusion checks. For example: module type S = sig type 'a foo constraint 'a = [< `Tag of & int ] end;;Error: Module type declarations do not match: |
Original bug ID: 5927
Reporter: @lpw25
Assigned to: @garrigue
Status: resolved (set by @garrigue on 2017-03-14T10:20:51Z)
Resolution: fixed
Priority: normal
Severity: minor
Target version: undecided
Fixed in version: 4.06.0 +dev/beta1/beta2/rc1
Category: typing
Tags: patch
Monitored by: @lpw25
Bug description
I think that the following behaviour is a bug:
type 'a foo = 'a constraint 'a = [< `Tag of & int];;
Error: Type declarations do not match:
type 'a foo = 'a constraint 'a = [<
Tag of & int ] is not included in type 'a foo = 'a constraint 'a = [<
Tag of & int ]I've attached a patch that seems to fix it.
File attachments
The text was updated successfully, but these errors were encountered: