From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 750DF7F026 for ; Thu, 10 Mar 2016 21:59:06 +0100 (CET) IronPort-PHdr: 9a23:/Brdwh9ossuhpv9uRHKM819IXTAuvvDOBiVQ1KB91e8cTK2v8tzYMVDF4r011RmSDdqdu6IP0rGL+4nbGkU+or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6anHS+4HYoFwnlMkItf6KuStGU35T8jrvvs7ToICx2xxOFKYtoKxu3qQiD/uI3uqBFbpgL9x3Sv3FTcP5Xz247bXianhL7+9vitMU7q3cY6Lod8JtsWLv7c+wRSbhDCyw+ezQ5/sSusxTcViOK62cVSXkfmRkOCA/AukLURJD05wz+t/RwwmGwNMv6QLR8DTOm7rlmUjfmiT0cK3g49iTdh9Z0jaQdrB/39E83+JLdfIzAbKk2RajaZ95PHWc= Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=oliver@first.in-berlin.de; spf=None smtp.mailfrom=oliver@first.in-berlin.de; spf=None smtp.helo=postmaster@einhorn.in-berlin.de Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of oliver@first.in-berlin.de) identity=pra; client-ip=192.109.42.8; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="oliver@first.in-berlin.de"; x-sender="oliver@first.in-berlin.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of oliver@first.in-berlin.de) identity=mailfrom; client-ip=192.109.42.8; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="oliver@first.in-berlin.de"; x-sender="oliver@first.in-berlin.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@einhorn.in-berlin.de) identity=helo; client-ip=192.109.42.8; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="oliver@first.in-berlin.de"; x-sender="postmaster@einhorn.in-berlin.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CRAAAn3+FWkwgqbcBehBBtBrxYGYV2AoFFPBABAQEBAQEBARABAQEBCQsJCSEvgi2CFAEBAQMBIxVBBQsLDgoCAhgOAgJXBhMaiAIIBK4WjxoBAQEHAgEdfIlehzqBOgWXPIVqgnKFEhlViEWFVo09AYEsN4IuEQiBSWmKUQEBAQ X-IPAS-Result: A0CRAAAn3+FWkwgqbcBehBBtBrxYGYV2AoFFPBABAQEBAQEBARABAQEBCQsJCSEvgi2CFAEBAQMBIxVBBQsLDgoCAhgOAgJXBhMaiAIIBK4WjxoBAQEHAgEdfIlehzqBOgWXPIVqgnKFEhlViEWFVo09AYEsN4IuEQiBSWmKUQEBAQ X-IronPort-AV: E=Sophos;i="5.24,317,1454972400"; d="scan'208";a="207102694" Received: from einhorn.in-berlin.de ([192.109.42.8]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Mar 2016 21:59:05 +0100 X-Envelope-From: oliver@first.in-berlin.de Received: from localhost (yak.in-berlin.de [192.109.42.109]) by einhorn.in-berlin.de (8.14.4/8.14.4/Debian-4) with ESMTP id u2AKx4tH017374 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 10 Mar 2016 21:59:04 +0100 Received: from x55b21176.dyn.telefonica.de (x55b21176.dyn.telefonica.de [85.178.17.118]) by webmail.in-berlin.de (Horde Framework) with HTTP; Thu, 10 Mar 2016 21:59:04 +0100 Date: Thu, 10 Mar 2016 21:59:04 +0100 Message-ID: <20160310215904.Horde.8tVDFl6XFFn2wZIOypn5GPj@webmail.in-berlin.de> From: Oliver Bandel To: David Allsopp Cc: caml-list@inria.fr References: <20160310204755.Horde.BihjgSho6HOkUTT_3QHgeTX@webmail.in-berlin.de> In-Reply-To: User-Agent: Horde Application Framework 5 Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes MIME-Version: 1.0 Content-Disposition: inline Subject: Re: [Caml-list] "type foo = Foo | Bar | Baz" vs. "type foo = Foo | Baz | Bar" Zitat von David Allsopp (Thu, 10 Mar 2016 19:50:34 +0000) > 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. Hmhhh, maybe I just did not changed the order before. (I often used ocamlc -i to generate mli-files and then removed the unneeded stuff from them, so I didn't changed the order.) > >> 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). [...] OK, thanks for the explanation. Ciao, Oliver