Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006209OCamlOCaml typingpublic2013-10-18 21:592013-10-19 12:09
Reporterjpdeplaix 
Assigned Togasche 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionduplicate 
PlatformOSOS Version
Product Version4.01.0 
Target VersionFixed in Version 
Summary0006209: Cannot override module types
DescriptionI'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 Reproducemodule 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 InformationTested with 4.01.0 and with the latest trunk (https://github.com/ocaml/ocaml/commit/349f151c0d7f0747d03a1e6d9a0696d480523abf [^])
TagsNo tags attached.
Attached Files

- Relationships
duplicate of 0005460assignedgarrigue Request: Replace/rename/remove module types 

-  Notes
(0010517)
jpdeplaix (reporter)
2013-10-18 22:02

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 ? »
(0010518)
yallop (developer)
2013-10-19 10:01

See http://caml.inria.fr/mantis/view.php?id=5460 [^]
(0010520)
gasche (developer)
2013-10-19 12:09

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

- Issue History
Date Modified Username Field Change
2013-10-18 21:59 jpdeplaix New Issue
2013-10-18 22:02 jpdeplaix Note Added: 0010517
2013-10-19 10:01 yallop Note Added: 0010518
2013-10-19 11:00 lpw25 Relationship added duplicate of 0005460
2013-10-19 12:09 gasche Note Added: 0010520
2013-10-19 12:09 gasche Status new => closed
2013-10-19 12:09 gasche Assigned To => gasche
2013-10-19 12:09 gasche Resolution open => duplicate


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker