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

ocamlc functor type private messed up #5469

Closed
vicuna opened this issue Jan 9, 2012 · 1 comment
Closed

ocamlc functor type private messed up #5469

vicuna opened this issue Jan 9, 2012 · 1 comment
Assignees
Labels

Comments

@vicuna
Copy link

vicuna commented Jan 9, 2012

Original bug ID: 5469
Reporter: jm
Assigned to: @garrigue
Status: closed (set by @garrigue on 2012-01-10T03:08:57Z)
Resolution: fixed
Priority: normal
Severity: major
Platform: i686
OS: Debian
OS Version: Sid
Version: 3.12.1
Fixed in version: 3.13.0+dev
Category: ~DO NOT USE (was: OCaml general)
Monitored by: @protz Camarade_Tux @hcarty @garrigue

Bug description

% tail -n +1 {ok,ko}.ml
==> ok.ml <==
module M (T:sig type t end)
= struct type t = private { t : T.t } end
module T = struct type t end
module R = M(T)

==> ko.ml <==
module M (T:sig type t end)
= struct type t = private { t : T.t } end
module P
= struct
module T = struct type t end
module R = M(T)
end
% ocamlc -i ok.ml
module M :
functor (T : sig type t end) -> sig type t = private { t : T.t; } end
module T : sig type t end
module R : sig type t = M(T).t = private { t : T.t; } end
/tmp % ocamlc -c ok.ml
% ocamlc -i ko.ml
module M :
functor (T : sig type t end) -> sig type t = private { t : T.t; } end
module P :
sig
module T : sig type t end
module R : sig type t = M(T).t = private { t : T.t; } end
end
% ocamlc -c ko.ml
File "ko.ml", line 1:
Error: The implementation ko.ml
does not match the interface (inferred signature):
Modules do not match:
sig
module T : sig type t = P.T.t end
module R : sig type t = P.R.t = private { t : T.t; } end
end
is not included in
sig
module T : sig type t end
module R : sig type t = M(T).t = private { t : T.t; } end
end
Modules do not match:
sig type t = R.t = private { t : T.t; } end
is not included in
sig type t = M(T).t = private { t : T.t; } end
Type declarations do not match:
type t = R.t = private { t : T.t; }
is not included in
type t = M(T).t = private { t : T.t; }

@vicuna
Copy link
Author

vicuna commented Jan 10, 2012

Comment author: @garrigue

Fixed in mtype.ml, both in trunk revision 12005 and version/3.12 revision 12006.

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

2 participants