From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by c5ff346549e7 (Postfix) with ESMTP id 928B65D5 for ; Thu, 29 Nov 2018 09:13:16 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.56,294,1539640800"; d="scan'208,217";a="357913866" Received: from sympa.inria.fr ([193.51.193.213]) by mail2-relais-roc.national.inria.fr with ESMTP; 29 Nov 2018 10:13:14 +0100 Received: by sympa.inria.fr (Postfix, from userid 20132) id C047E82547; Thu, 29 Nov 2018 10:13:14 +0100 (CET) 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 87939824CF for ; Thu, 29 Nov 2018 10:12:59 +0100 (CET) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=yrg@irif.fr; spf=Pass smtp.mailfrom=yrg@irif.fr; spf=None smtp.helo=postmaster@korolev.univ-paris7.fr IronPort-PHdr: =?us-ascii?q?9a23=3AbsRB4h/JaH9Uif9uRHKM819IXTAuvvDOBiVQ1KB4?= =?us-ascii?q?0ugcTK2v8tzYMVDF4r011RmVBdWds6oMotGVmpioYXYH75eFvSJKW713fDhBt/?= =?us-ascii?q?8rmRc9CtWOE0zxIa2iRSU7GMNfSA0tpCnjYgBaF8nkelLdvGC54yIMFRXjLwp1?= =?us-ascii?q?Ifn+FpLPg8it2O2+557ebx9UiDahfLh/MAi4oQLNu8cMnIBsMLwxyhzHontJf+?= =?us-ascii?q?RZ22ZlLk+Nkhj/+8m94odt/zxftPw9+cFAV776f7kjQrxDEDsmKWE169b1uhTF?= =?us-ascii?q?UACC+2ETUmQSkhpPHgjF8BT3VYr/vyfmquZw3jSRMMvrRr42RDui9b9mRxDmiC?= =?us-ascii?q?gFNzA3/mLZhNFugq1Hux+uvQBzzpTObY2JKPZzfKXQds4aS2pbWcZRUjRMDYGm?= =?us-ascii?q?YIsJCeoKIPpWqJPyp1sPthuyHAiiBOL1xT9OnHD2xrAx3uMhEAHc0wwtBNMOsG?= =?us-ascii?q?7VrNX7LqsSX/q1wbDOwD7ebP1WwS/w5JXMfx0uu/2AQ7J9fMXLxUQuCg/JlEic?= =?us-ascii?q?pILmMj+NyOgBr2yW4/BjWO+vkWIrtRx9rzi1yssxiITEhIQYwU3e+ypj2oY6P9?= =?us-ascii?q?i4RVZ7YdG6FJtQsDmXN4hxQsM4RGFovDg1yqMctZ6meigKyYonywfHa/OdaYiI?= =?us-ascii?q?4wnjWeSLLTd2nnJpYLO/hxCs/ki80uDwS8253VlQoiZbktTBuWoB2h3O5sSdV/?= =?us-ascii?q?dw8ESs1S6K1w/J6+FEJU40lbDcK54k2rMxloATsUvYEy/3gkX2jaGWel8q+uiy?= =?us-ascii?q?8+jneKnppoeAN49ojQHzKrghlda6AeQ8KwQOW2mb+f+g1LD45k34QLBKjuUsna?= =?us-ascii?q?XDsZDaI94bpq+jDANP3IYj8UX3MzDz/s6ZkfgdLVkNUhWalcC9N1zAOv31Jfi6?= =?us-ascii?q?ilWo1jxswqaVEKfmB8D8J37F2I1gcrdmrmFdwQw61pgL9ohbIrAbIfy1VFWn54?= =?us-ascii?q?+QNQMwLwHhm7WvM956zI5LATveUJ/cC7vbtBqz3sxqJuCNYIEPvzOsefk/5vCo?= =?us-ascii?q?g2VrwAZBL5ns5oMebTWDJtojO1+QMCjtmNYPV2kQ7FJnEb7azWaaWDsWXE6cGq?= =?us-ascii?q?Ix4jZhVNClCp3EQo2zxqGH3Tn+BpRMZ3sZTF6WQy/l?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0BpAwB2rP9bh4o9/sJlHgEGBwaBZYExg?= =?us-ascii?q?jsngzo/gR2HWospgg0PiQF2jzYLAQErAYQ7AwICgy8aBwEENBIBAwEBAgEBAQE?= =?us-ascii?q?BEwEBAQoLCQgpL4I2IoJkAQEBAQIBDBdWBQsJAgQHDSoCAiEBEgEFARwGE4Mhg?= =?us-ascii?q?WoDDQgBA4pokAc8iw2BL4gEDYEOgQ6MFheBf4QjgleFLoJXAok0lkEuCYEMhTG?= =?us-ascii?q?HSYMsGJEcjmKJQwIEBgUCBQ4BIYEFN4F2TScROzEGgjWCNRuODEAxgQUBAY04A?= =?us-ascii?q?QE?= X-IPAS-Result: =?us-ascii?q?A0BpAwB2rP9bh4o9/sJlHgEGBwaBZYExgjsngzo/gR2HWos?= =?us-ascii?q?pgg0PiQF2jzYLAQErAYQ7AwICgy8aBwEENBIBAwEBAgEBAQEBEwEBAQoLCQgpL?= =?us-ascii?q?4I2IoJkAQEBAQIBDBdWBQsJAgQHDSoCAiEBEgEFARwGE4MhgWoDDQgBA4pokAc?= =?us-ascii?q?8iw2BL4gEDYEOgQ6MFheBf4QjgleFLoJXAok0lkEuCYEMhTGHSYMsGJEcjmKJQ?= =?us-ascii?q?wIEBgUCBQ4BIYEFN4F2TScROzEGgjWCNRuODEAxgQUBAY04AQE?= X-IronPort-AV: E=Sophos;i="5.56,294,1539640800"; d="scan'208,217";a="357913723" Received: from korolev.univ-paris7.fr ([194.254.61.138]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Nov 2018 10:12:58 +0100 Received: from potemkin.univ-paris7.fr (potemkin.univ-paris7.fr [IPv6:2001:660:3301:8000::1:1]) by korolev.univ-paris7.fr (8.14.4/8.14.4/relay1/82085) with ESMTP id wAT9Cqub029431 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Thu, 29 Nov 2018 10:12:52 +0100 Received: from mailhub.math.univ-paris-diderot.fr (mailhub.math.univ-paris-diderot.fr [81.194.30.253]) by potemkin.univ-paris7.fr (8.14.4/8.14.4/relay2/82085) with ESMTP id wAT9Cs8S003348 for ; Thu, 29 Nov 2018 10:12:54 +0100 Received: from mailhub.math.univ-paris-diderot.fr (localhost [127.0.0.1]) by mailhub.math.univ-paris-diderot.fr (Postfix) with ESMTP id 6757034565 for ; Thu, 29 Nov 2018 10:12:58 +0100 (CET) X-Virus-Scanned: amavisd-new at math.univ-paris-diderot.fr Received: from mailhub.math.univ-paris-diderot.fr ([127.0.0.1]) by mailhub.math.univ-paris-diderot.fr (mailhub.math.univ-paris-diderot.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id KGIh_WzDHZGx for ; Thu, 29 Nov 2018 10:12:56 +0100 (CET) Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) (Authenticated sender: yrg) by mailhub.math.univ-paris-diderot.fr (Postfix) with ESMTPSA id 7A3D43455F for ; Thu, 29 Nov 2018 10:12:56 +0100 (CET) Received: by mail-pg1-f177.google.com with SMTP id n2so652928pgm.3 for ; Thu, 29 Nov 2018 01:12:56 -0800 (PST) X-Gm-Message-State: AA+aEWbiBa9HpOx9UrqQ+aNuYLGjfOW1aFvBnYENgdDiffmjmX3wuZCG 7yxoSL833UQ3o7yXasCknBIxuy5a6wWI4CIFS3U= X-Google-Smtp-Source: AFSGD/U8MX6Kkf5uhwIZ5lPTR4qwQBgZfcBK9jGIrtPOhCuz+O+aoPY3PvEfYu8HWxV6sJHA+sxOHbpA11ILqO1Rym0= X-Received: by 2002:a62:931a:: with SMTP id b26mr650999pfe.65.1543482775182; Thu, 29 Nov 2018 01:12:55 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: =?UTF-8?B?WWFubiBSw6lnaXMtR2lhbmFz?= Date: Thu, 29 Nov 2018 10:12:43 +0100 X-Gmail-Original-Message-ID: Message-ID: To: =?UTF-8?B?RnLDqWTDqXJpYyBCb3Vy?= Cc: danny.gratzer@gmail.com, caml-list@inria.fr Content-Type: multipart/alternative; boundary="0000000000008823bd057bca16a9" X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (korolev.univ-paris7.fr [IPv6:2001:660:3301:8000::1:2]); Thu, 29 Nov 2018 10:12:52 +0100 (CET) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (potemkin.univ-paris7.fr [194.254.61.141]); Thu, 29 Nov 2018 10:12:54 +0100 (CET) X-Miltered: at korolev with ID 5BFFAD94.000 by Joe's j-chkmail (http : // j-chkmail dot ensmp dot fr)! X-Miltered: at potemkin with ID 5BFFAD96.000 by Joe's j-chkmail (http : // j-chkmail dot ensmp dot fr)! X-j-chkmail-Enveloppe: 5BFFAD94.000 from potemkin.univ-paris7.fr/potemkin.univ-paris7.fr/null/potemkin.univ-paris7.fr/ X-j-chkmail-Enveloppe: 5BFFAD96.000 from mailhub.math.univ-paris-diderot.fr/mailhub.math.univ-paris-diderot.fr/null/mailhub.math.univ-paris-diderot.fr/ X-j-chkmail-Score: MSGID : 5BFFAD94.000 on korolev.univ-paris7.fr : j-chkmail score : . : R=. U=. O=. B=0.000 -> S=0.000 X-j-chkmail-Score: MSGID : 5BFFAD96.000 on potemkin.univ-paris7.fr : j-chkmail score : . : R=. U=. O=. B=0.000 -> S=0.000 X-j-chkmail-Status: Ham X-j-chkmail-Status: Ham Subject: Re: [Caml-list] include two module implementations sharing the same type definitions Reply-To: =?UTF-8?B?WWFubiBSw6lnaXMtR2lhbmFz?= X-Loop: caml-list@inria.fr X-Sequence: 17193 Errors-to: caml-list-owner@inria.fr Precedence: list Precedence: bulk Sender: caml-list-request@inria.fr X-no-archive: yes List-Id: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --0000000000008823bd057bca16a9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thank you Fr=C3=A9d=C3=A9ric! Le jeu. 29 nov. 2018 =C3=A0 10:08, Fr=C3=A9d=C3=A9ric Bour a =C3=A9crit : > 1) In all generality, > > include (BI : module type of struct include BI end with type t :=3D t) > > will work if you haven't defined `module type B` or if `BI` exports other > types (say u) and you need to preserve equalities (BI.u =3D B.u). > > 2) Changes have been made to the module system in the trunk version of > OCaml. The original code should be accepted without any change. > > On Thu, Nov 29, 2018 at 10:03 AM Danny Gratzer > wrote: > >> Hello, >> >> Perhaps I'm overlooking something but replacing >> >> include BI >> >> with >> >> include (BI : B with type t :=3D t) >> >> seems like a reasonable fix to me. >> >> Danny >> > -- Yann R=C3=A9gis-Gianas --=20 Caml-list mailing list. Subscription management and archives: https://sympa.inria.fr/sympa/arc/caml-list https://inbox.ocaml.org/caml-list Forum: https://discuss.ocaml.org/ Bug reports: http://caml.inria.fr/bin/caml-bugs= --0000000000008823bd057bca16a9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thank you Fr=C3=A9d=C3=A9ric!

Le=C2=A0jeu. 29 nov. 2018 =C3=A0=C2=A010:08, Fr=C3= =A9d=C3=A9ric Bour <defree@gmail.com= > a =C3=A9crit=C2=A0:
1) In all generality,

=C2=A0 include (BI : module ty= pe of struct include BI end with type t :=3D t)

will work if y= ou haven't defined `module type B` or if `BI` exports other types (say = u) and you need to preserve equalities (BI.u =3D B.u).

2) Changes have been made to the module system in the trunk version= of OCaml. The original code should be accepted without any change.

=
--
Yann R=C3=A9gis-Gianas

--0000000000008823bd057bca16a9--