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

including module with private type causes strange error #4383

Closed
vicuna opened this issue Sep 9, 2007 · 1 comment
Closed

including module with private type causes strange error #4383

vicuna opened this issue Sep 9, 2007 · 1 comment
Labels

Comments

@vicuna
Copy link

vicuna commented Sep 9, 2007

Original bug ID: 4383
Reporter: squirrel
Status: closed (set by @garrigue on 2007-09-10T03:05:31Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.10.0
Fixed in version: 3.10+dev
Category: ~DO NOT USE (was: OCaml general)
Monitored by: squirrel

Bug description

If a module A containing a private type is included in module B which does not have a type signature, the following error occurs:

The implementation b.ml does not match the interface (inferred signature):
Type declarations do not match:
type t = A.t
is not included in
type t = A.t#row

This did not occur in 3.09.3.

Additional information

The following code was used to produce this error:


module A = struct
type t = private [> ]
end

include A

The same error occurs if a private object type is used in place of the private variant.

Note that if the struct is included directly, e.g. "include struct type t = private [> ] end", then the error does not occur.

@vicuna
Copy link
Author

vicuna commented Sep 10, 2007

Comment author: @garrigue

Fixed in CVS.
The code was assuming than row types could only be abstract in signatures,
but after some change in 3.10 a module may be checked with the signature
inferred from itself, which may in turn contain manifest row types if the
include construct was used...

@vicuna vicuna closed this as completed Sep 10, 2007
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant