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

Cannot override module types #6209

Closed
vicuna opened this issue Oct 18, 2013 · 3 comments
Closed

Cannot override module types #6209

vicuna opened this issue Oct 18, 2013 · 3 comments

Comments

@vicuna
Copy link

vicuna commented Oct 18, 2013

Original bug ID: 6209
Reporter: jpdeplaix
Assigned to: @gasche
Status: closed (set by @gasche on 2013-10-19T10:09:50Z)
Resolution: duplicate
Priority: normal
Severity: minor
Version: 4.01.0
Category: typing
Duplicate of: #5460

Bug description

I'm unable to override module types inside module with the := method which works for types and modules but not module types.
The following examples will be more explicits.

Is there a

Steps to reproduce

module A = struct
module B = struct
let test = 1
end
end;;
(* module A : sig module B : sig val test : int end end *)

module C = struct
include (A : module type of A with module B := A.B)
module B = struct
let test = "1"
end
end;;
(* module C : sig module B : sig val test : string end end *)

module D = struct
type e = int
end;;
(* module D : sig type e = int end *)

module F = struct
include (D : module type of D with type e := D.e)
type e = string
end;;
(* module F : sig type e = string end *)

module G = struct
module type H = sig
val test : int
end
end;;
(* module G : sig module type H = sig val test : int end end *)

module I = struct
include (G : module type of G with module type H := G.H)
module type H = sig
val test : string
end
end;;
(* Syntax error: ')' expected, the highlighted '(' might be unmatched *)

Additional information

Tested with 4.01.0 and with the latest trunk (349f151)

@vicuna
Copy link
Author

vicuna commented Oct 18, 2013

Comment author: jpdeplaix

Sorry missed click, so I'll finish my sentence here:
« Is there a syntax that I'm not aware of, or is it something really missing ? »

@vicuna
Copy link
Author

vicuna commented Oct 19, 2013

Comment author: @yallop

See #5460

@vicuna
Copy link
Author

vicuna commented Oct 19, 2013

Comment author: @gasche

Indeed, I'll mark this as a duplicate, so that the discussion only happens in #5460.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants