We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Original bug ID: 7337 Reporter: furuse Assigned to: @gasche Status: closed (set by @xavierleroy on 2017-09-24T15:33:26Z) Resolution: duplicate Priority: normal Severity: major Version: 4.03.0 Category: typing Duplicate of: #5514 Monitored by: @gasche
In OCaml 4.03.0, S with module M = N adds all the components available of N's signature to S. It contradicts what the reference manual says: 6.10.4 of http://caml.inria.fr/pub/docs/manual-ocaml/modtypes.html
The following code reproduce the issue:
module type S = sig module M : sig type t end end
module N = struct type t = int type u = float let x = 1 end
module type T = S with module M = N
Above, I thought module type T is equal to
sig module M : sig type t = N.t end end
but ocamlc -i shows that
sig module M : sig type t = int type u = float val x : int end end
The text was updated successfully, but these errors were encountered:
Comment author: furuse
Oh, my second thought sig type t = int type u = float val x : int end is a subtype of the original type, so it is ok... ;-)
Sorry, something went wrong.
Ah, in #5514, people have already discuss about the document issue too. Thanks!
gasche
No branches or pull requests
Original bug ID: 7337
Reporter: furuse
Assigned to: @gasche
Status: closed (set by @xavierleroy on 2017-09-24T15:33:26Z)
Resolution: duplicate
Priority: normal
Severity: major
Version: 4.03.0
Category: typing
Duplicate of: #5514
Monitored by: @gasche
Bug description
In OCaml 4.03.0, S with module M = N adds all the components available of N's signature to S. It contradicts what the reference manual says: 6.10.4 of http://caml.inria.fr/pub/docs/manual-ocaml/modtypes.html
Steps to reproduce
The following code reproduce the issue:
module type S = sig
module M : sig type t end
end
module N = struct
type t = int
type u = float
let x = 1
end
module type T = S with module M = N
Above, I thought module type T is equal to
sig module M : sig type t = N.t end end
but ocamlc -i shows that
sig module M : sig type t = int type u = float val x : int end end
The text was updated successfully, but these errors were encountered: