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

Semantics of "with module" constraints #6140

Closed
vicuna opened this issue Aug 27, 2013 · 1 comment
Closed

Semantics of "with module" constraints #6140

vicuna opened this issue Aug 27, 2013 · 1 comment

Comments

@vicuna
Copy link

vicuna commented Aug 27, 2013

Original bug ID: 6140
Reporter: @alainfrisch
Assigned to: @alainfrisch
Status: closed (set by @garrigue on 2015-02-06T01:45:59Z)
Resolution: duplicate
Priority: normal
Severity: minor
Category: typing
Duplicate of: #5514

Bug description

The manual says:


The constraint module module-path = extended-module-path adds type equations to all type components of the sub-structure denoted by module-path, making them equivalent to the corresponding type components of the structure denoted by extended-module-path.


It seems, however, that this construction can also add more items in the constrained sub-modules. For instance, the following mli file is accepted (on trunk):

============================
module A0 : sig type t val x: string end

module X : sig
module A : sig end
end with module A = A0

Compiling it with "ocamlc -i" returns:

============================
module A0 : sig type t val x : string end
module X : sig module A : sig type t = A0.t val x : string end end

Is it the intended behavior? If yes, I'd suggest to update the manual.

@vicuna
Copy link
Author

vicuna commented Aug 27, 2013

Comment author: @alainfrisch

Sorry, this is an exact duplicate of #5514.

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