caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: David Allsopp <dra-news@metastack.com>
To: Oliver Bandel <oliver@first.in-berlin.de>,
	"caml-list@inria.fr" <caml-list@inria.fr>
Subject: RE: [Caml-list] "type foo = Foo | Bar | Baz"  vs.  "type foo = Foo | Baz | Bar"
Date: Thu, 10 Mar 2016 19:50:34 +0000	[thread overview]
Message-ID: <E51C5B015DBD1348A1D85763337FB6D9EA34D002@Remus.metastack.local> (raw)
In-Reply-To: <20160310204755.Horde.BihjgSho6HOkUTT_3QHgeTX@webmail.in-berlin.de>

Oliver Bandel wrote:
> Hello,
> 
> I got an error message when the ml-file and the mli-file have a sum-type,
> where the order of the type definitionis different.
> This seems to be new, at least I did not found such an error message
> before.
> 
> ==========================================================================
> =
> File "foo.ml", line 1:
> Error: The implementation foo.ml does not match the interface foo.cmi:
>         Type declarations do not match:
>           type foo = Foo | Bar | Baz
>         is not included in
>           type foo = Foo | Baz | Bar
>         File "foo.ml", line 1, characters 0-26: Actual declaration
>         Fields number 2 have different names, Bar and Baz.
> ==========================================================================
> =

It has always been the case, but I think the error message used to be much less clear.

> I looked for warning-/error-codes, to look, if checking the order of the
> definition of a type can be switched on and off.
> 
> But I didn't found a number, that I can use with -w-switch.

It's not a warning, so you can't switch it off - having a different order of constructors makes the type different (it changes the runtime representation).


David 


  reply	other threads:[~2016-03-10 19:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-10 19:47 Oliver Bandel
2016-03-10 19:50 ` David Allsopp [this message]
2016-03-10 20:59   ` Oliver Bandel

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=E51C5B015DBD1348A1D85763337FB6D9EA34D002@Remus.metastack.local \
    --to=dra-news@metastack.com \
    --cc=caml-list@inria.fr \
    --cc=oliver@first.in-berlin.de \
    /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).