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

Incremental weakening of module aliases is not allowed #6465

Closed
vicuna opened this issue Jun 19, 2014 · 5 comments
Closed

Incremental weakening of module aliases is not allowed #6465

vicuna opened this issue Jun 19, 2014 · 5 comments
Assignees
Milestone

Comments

@vicuna
Copy link

vicuna commented Jun 19, 2014

Original bug ID: 6465
Reporter: @garrigue
Assigned to: @garrigue
Status: closed (set by @xavierleroy on 2016-12-07T10:47:11Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.02.0+dev
Target version: 4.02.2+dev / +rc1
Fixed in version: 4.03.0+dev / +beta1
Category: typing
Tags: patch

Bug description

Assuming:
module M = struct type t = A module B = struct type u = B end end;;

the following fails:
module P : sig type t = M.t = A module B = M.B end = M;;

wheras this works:
module P : sig type t = M.t = A module B = M.B end = struct include M end;;

Clearly one would expect the type of M to be a subtype of that of struct include M end.

File attachments

@vicuna
Copy link
Author

vicuna commented Jun 20, 2014

Comment author: @garrigue

Added a preliminary patch, but it does not pass all tests yet (a problem with recursive modules).

@vicuna
Copy link
Author

vicuna commented Jun 20, 2014

Comment author: @garrigue

Updated the patch. Now all tests in the typing testsuite go through.

@vicuna
Copy link
Author

vicuna commented Jul 17, 2014

Comment author: @garrigue

Does the new target mean that I should merge the patch in the 4.02 branch now?
(Sorry, I've been busy with other things, and forgot to follow on this one...)

@vicuna
Copy link
Author

vicuna commented Jul 24, 2014

Comment author: @garrigue

Merging will have to wait for later, as the current patch breaks camlp4.

@vicuna
Copy link
Author

vicuna commented Feb 6, 2015

Comment author: @garrigue

Patch was merged in trunk at revision 15405.

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