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

Allow _ in module type constraints #6620

Closed
vicuna opened this issue Oct 20, 2014 · 2 comments
Closed

Allow _ in module type constraints #6620

vicuna opened this issue Oct 20, 2014 · 2 comments

Comments

@vicuna
Copy link

vicuna commented Oct 20, 2014

Original bug ID: 6620
Reporter: @yallop
Status: acknowledged (set by @damiendoligez on 2014-12-17T23:06:29Z)
Resolution: open
Priority: normal
Severity: feature
Category: typing
Tags: junior_job

Bug description

For uniformity, and in the interests of not having to name things that aren't used, it'd be useful to be able to leave type parameters in module type constraints unnamed:

module type S = sig type _ t end
module type T = S with type _ t = unit

@vicuna
Copy link
Author

vicuna commented Dec 17, 2014

Comment author: @damiendoligez

That's not very good for readability.

Ideally, you'd give your type variable a name that documents the role of the type parameter, but unfortunately that's not in the OCaml culture.

@yallop
Copy link
Member

yallop commented Apr 8, 2019

This is fixed in trunk (perhaps by the switch to Menhir?):

# module type S = sig type _ t end;;
module type S = sig type _ t end
# module type T = S with type _ t = unit;;
module type T = sig type _ t = unit end

@yallop yallop closed this as completed Apr 8, 2019
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