Skip to content
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

warning +34 exposes #row with private types #7438

Closed
vicuna opened this issue Dec 21, 2016 · 5 comments
Closed

warning +34 exposes #row with private types #7438

vicuna opened this issue Dec 21, 2016 · 5 comments
Assignees
Milestone

Comments

@vicuna
Copy link

vicuna commented Dec 21, 2016

Original bug ID: 7438
Reporter: @avsm
Assigned to: @alainfrisch
Status: resolved (set by @alainfrisch on 2017-02-20T09:35:17Z)
Resolution: fixed
Priority: normal
Severity: major
Version: 4.04.0
Target version: 4.05.0 +dev/beta1/beta2/beta3/rc1
Fixed in version: 4.05.0 +dev/beta1/beta2/beta3/rc1
Category: typing
Related to: #6985
Monitored by: @gasche

Bug description

# #warnings "+34";;
# module type S = sig type t = private [> `Foo] end;;
module type S = sig type t = private [> `Foo ] end
# module type X = sig type t = private [> `Foo | `Bar] include S with type t := t end;;
Warning 34: unused type t#row.
module type X = sig type t = private [> `Bar | `Foo ] end

The t#row should not expose the row variable here, and the warning+34 shouldn't be triggered.

Additional information

Found by Thomas Gazagnaire during mirage/mirage#743

@vicuna
Copy link
Author

vicuna commented Feb 16, 2017

Comment author: @xavierleroy

@garrigue could you please have a look? Thanks!

@vicuna
Copy link
Author

vicuna commented Feb 18, 2017

Comment author: @garrigue

Since this is an unused warning problem, I suppose Alain knows best what to do.
Namely, the warning shouldn't be triggered when the name of the type ends with "#row", but I'm not sure where it is best done.
Btype has utility functions is_row_name and is_constr_row to help.

@vicuna
Copy link
Author

vicuna commented Feb 19, 2017

Comment author: @xavierleroy

@Frisch could you please have a look before 4.05 is released? Thank you.

@vicuna
Copy link
Author

vicuna commented Feb 20, 2017

Comment author: @alainfrisch

Looking at it.

@vicuna
Copy link
Author

vicuna commented Feb 20, 2017

Comment author: @alainfrisch

Fixed by 0855920 on trunk, cherry-picked as f29cadc on 4.05.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants