caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jean-Louis Giavitto <jean-louis.giavitto@ircam.fr>
To: caml-list@inria.fr
Subject: [Caml-list] In 3.12 and 4.0, erratic message "The implementation tt.ml does not match the interface tt.cmi"
Date: Thu, 05 Jul 2012 00:54:07 +0200	[thread overview]
Message-ID: <4FF4C98F.2030703@ircam.fr> (raw)

Hello.
if anyone could give me some hints on the following problem...


I have a file tt.ml which reduces to

   type typedef = {
     isa : 'a 'rep 'cell .
       (('rep, int, int, int, int, int) #Collection.collection as 'a);
   }

The mli file is exactly the same has the ml file. 'collection' is a 
virtual class declared in file collection.ml and signature in 
collection.mli.

tt.ml compile without problems. However, if I replace (in tt.ml and 
tt.mli) one of the 'int' parameter by a type variable:

  type typedef = {
   isa :
     'a 'rep 'cell .
       (('rep, 'cell, int, int, int, int) #Collection.collection
        as 'a);
  }

then I have the following message (with the 4.0 compiler):

File "tt.ml", line 1:
Error: The implementation tt.ml does not match the interface tt.cmi:
        Type declarations do not match:
          type typedef = {
            isa :
              'a 'rep 'cell.
          ('rep, 'cell, int, int, int, int) #Collection.collection as 'a;
          }
        is not included in
          type typedef = {
            isa :
              'a 'rep 'cell.
          ('rep, 'cell, int, int, int, int) #Collection.collection as 'a;
          }
        File "tt.ml", line 2, characters 5-112: Actual declaration
        The types for field isa are not equal.


- The problem appears with the compiler 3.12 but also 4.0 (a similar 
error (5622) was reported but was not reproducible with 4.0).
- I have no problem if I drop the .mli file.
- The error seems sensitive to the definition of the class 'collection': 
I was not able to reproduce it with a much simpler definition of 
collection.
- I have the same error if I replace more 'int' parameter by type 
variables.

Have you any clues?
Jean-Louis Giavitto.


             reply	other threads:[~2012-07-04 22:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-04 22:54 Jean-Louis Giavitto [this message]
2012-07-06 19:36 ` [Caml-list] Problem of type equality in a single definition (was: In 3.12 and 4.0, erratic message "The implementation tt.ml does not match the interface tt.cmi") Jean-Louis Giavitto
2012-07-07  0:13   ` Jacques Garrigue

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FF4C98F.2030703@ircam.fr \
    --to=jean-louis.giavitto@ircam.fr \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).