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

Functor application in PR#6435 fail after commit 15405 #6593

Closed
vicuna opened this issue Oct 2, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@vicuna
Copy link

commented Oct 2, 2014

Original bug ID: 6593
Reporter: @garrigue
Assigned to: @garrigue
Status: closed (set by @xavierleroy on 2016-12-07T10:34:54Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.03.0+dev / +beta1
Target version: 4.03.0+dev / +beta1
Fixed in version: 4.03.0+dev / +beta1
Category: typing

Bug description

Commit 15405 in trunk breaks the basic-modules test in the testsuite.
There is a type error in a functor application.

@vicuna

This comment has been minimized.

Copy link
Author

commented Oct 2, 2014

Comment author: @garrigue

Fixed in trunk at revision 15413.

This is actually a very interesting bug, because the cause is not commit 15405,
and it could have disappeared after more changes. In particular, while it appears
using ocamlc, it doesn't if you load the contents of main.ml in the toplevel.
The real source of the bug is that when reading a signature from a cmi, one must
be careful of copying all the types, since otherwise some type ids could be shared
between different types. This was done in almost all cases, since accessing a
component of the module triggers a substitution. However, this was not done when
using the signature directly, for instance when passing the module as argument to
a functor. By chance, commit 15405 caused such a conflict to happen.

This is now fixed in trunk by forcing such a (lazy) substitution.
Could be needed in 4.02 too, but we have no report of such problem there...

@vicuna vicuna closed this Dec 7, 2016

@vicuna vicuna added the typing label Mar 14, 2019

@vicuna vicuna added this to the 4.03.0 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.