Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006304OCamlOCaml generalpublic2014-01-24 11:382014-01-24 15:50
ReporterJulien Signoles 
Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0006304: Explicit interface for a pack, "module type of" and type generativity
DescriptionConsider the following files:
type t = X (* replacing 't' with a non-generative type works fine *)
let x = A.x

module A: module type of A
module B: module type of B
  (* sig val x: A.t end (* this version works fine *) *)

$ ocamlc -c a.mli && ocamlc -c && ocamlc -c pack.mli && ocamlc -pack -o pack.cmo a.cmi b.cmo
File "_none_", line 1:
Error: The implementation (obtained by packing)
       does not match the interface pack.mli:
       In module B:
       Modules do not match:
         sig val x : A.t end
       is not included in
         sig val x : A.t end
       In module B:
       Values do not match: val x : A.t is not included in val x : A.t

It looks like a bug, in particular because the following version, which provides an explicit file equivalent (?) to the generated pack, works fine:
module A = A
module B = B
$ ocamlc -c a.mli && ocamlc -c && ocamlc -c pack.mli && ocamlc -c
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2014-01-24 11:38 Julien Signoles New Issue

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker