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

Comments

Projects
None yet
2 participants
@vicuna
Copy link

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

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link
Author

commented Jun 20, 2014

Comment author: @garrigue

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

@vicuna

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link
Author

commented Jul 24, 2014

Comment author: @garrigue

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

@vicuna

This comment has been minimized.

Copy link
Author

commented Feb 6, 2015

Comment author: @garrigue

Patch was merged in trunk at revision 15405.

@vicuna vicuna closed this Dec 7, 2016

@vicuna vicuna added the typing label Mar 14, 2019

@vicuna vicuna added this to the 4.02.2 milestone Mar 14, 2019

@vicuna vicuna added the bug label Mar 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.