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
StatusnewResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0006304: Explicit interface for a pack, "module type of" and type generativity
DescriptionConsider the following files:
=====
a.mli:
type t = X (* replacing 't' with a non-generative type works fine *)

b.ml:
let x = A.x

pack.mli
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 b.ml && 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 pack.ml equivalent (?) to the generated pack, works fine:
=====
pack.ml:
module A = A
module B = B
====
$ ocamlc -c a.mli && ocamlc -c b.ml && ocamlc -c pack.mli && ocamlc -c pack.ml
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