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

[github patch] short functor type syntax (S -> T) in the non-dependent case #6391

Closed
vicuna opened this issue May 3, 2014 · 2 comments
Closed
Assignees

Comments

@vicuna
Copy link

vicuna commented May 3, 2014

Original bug ID: 6391
Reporter: @gasche
Assigned to: @damiendoligez
Status: closed (set by @mshinwell on 2016-12-07T13:51:23Z)
Resolution: fixed
Priority: low
Severity: feature
Category: ~DO NOT USE (was: OCaml general)
Tags: github, patch

Bug description

#42

Add support for simple functor types of the form:

S -> T

equivalent to:

functor (_ : S) -> T

The S and T can be any module type expressions.

While not actually ambiguous there is a potential shift-reduce conflict related to with constraints:

S with type t = int -> float

vs

S with type t = int -> T

This is resolved in favour of the first one (shift), meaning that the second type must be written:

(S with type t = int) -> T
@vicuna
Copy link
Author

vicuna commented Dec 7, 2016

Comment author: @mshinwell

This has been merged

@vicuna
Copy link
Author

vicuna commented Dec 7, 2016

Comment author: @mshinwell

Merged in 4.03

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