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 sympa.inria.fr (Postfix) with ESMTPS id 230E37FD15 for ; Mon, 2 Nov 2015 21:01:21 +0100 (CET) IronPort-PHdr: 9a23:N8F+CBYSnPAuqjItZMW3Vcr/LSx+4OfEezUN459isYplN5qZpcu8bnLW6fgltlLVR4KTs6sC0LqL9fq9EjVav96oizMrTt9lb1c9k8IYnggtUoauKHbQC7rUVRE8B9lIT1R//nu2YgB/Ecf6YEDO8DXptWZBUiv2OQc9HOnpAIma153xjLDvvceOKFwS2nKUWvBbElaflU3prM4YgI9veO4a6yDihT92QdlQ3n5iPlmJnhzxtY+a9Z9n9DlM6bp6r5YTGY2zRakzTKRZATI6KCh1oZSz7ViQBTeIs1AVV2FethtTH0CR5xj/WtL1szDmnut7wiiTe8PsG+MaQzOnuo5wSB7ziG8uODcj72jTwph5g6tBvxul/k0gnqbbZYiUMLx1eaaLLoBSfnZIQssED38JOYi7dYZaSrNZZes= Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=agarwal1975@gmail.com; spf=Pass smtp.mailfrom=agarwal1975@gmail.com; spf=None smtp.helo=postmaster@mail-wm0-f48.google.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of agarwal1975@gmail.com) identity=pra; client-ip=74.125.82.48; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="agarwal1975@gmail.com"; x-sender="agarwal1975@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of agarwal1975@gmail.com designates 74.125.82.48 as permitted sender) identity=mailfrom; client-ip=74.125.82.48; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="agarwal1975@gmail.com"; x-sender="agarwal1975@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-wm0-f48.google.com) identity=helo; client-ip=74.125.82.48; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="agarwal1975@gmail.com"; x-sender="postmaster@mail-wm0-f48.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0B1AgDYwDdWlDBSfUpeg1o0bwasJYZ+i3I5gVoZhzcHORMBAQEBAQEBARABAQEBBwsLCR8wgi6BfiIRHQEbHgMSAwUBBzcCJAERAQUBFgw1h3gBAxKTO41GggiBMT4xi0mBbIJ5hwEKGScNVoQOAQUOk2KBRQWOEYgrB4UdiAiabRIkgRcREgGCFVGBeyA0hX4BAQE X-IPAS-Result: A0B1AgDYwDdWlDBSfUpeg1o0bwasJYZ+i3I5gVoZhzcHORMBAQEBAQEBARABAQEBBwsLCR8wgi6BfiIRHQEbHgMSAwUBBzcCJAERAQUBFgw1h3gBAxKTO41GggiBMT4xi0mBbIJ5hwEKGScNVoQOAQUOk2KBRQWOEYgrB4UdiAiabRIkgRcREgGCFVGBeyA0hX4BAQE X-IronPort-AV: E=Sophos;i="5.20,236,1444687200"; d="scan'208";a="185691031" Received: from mail-wm0-f48.google.com ([74.125.82.48]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 02 Nov 2015 21:01:20 +0100 Received: by wmll128 with SMTP id l128so70447215wml.0 for ; Mon, 02 Nov 2015 12:01:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=McROyUoJf8xsD/Nj4robABzLEdvCLI5sfu8d+8hujh0=; b=dWqhH0xhFqOxprMQfxdRr+MnkQ8TqtHd1llX3FzJGCEO6mQxNxINTVstThAUJTfS6+ Ji/QTSmkbH6w4TkTiPqEWuddsRjPgZTiPUqfTFQGFtrVczhnn+CcTNf8SefekiSvenFd 8JOeLIiFssgn6YkhtfwdmR2GShHUoycOWRqymWOXODudrVyjhL1/qIWKmnL2RrgAAqiv yJiV68W5o2q/lc5BzrocfrbJL9OHyydhg/DQ2GtcpOGzuVhE+WSHyAg5KDBCLfc6ZH3n AG3oFkY09Htr1WFHjdXxjkpEuBjJ7/gkBCzi2KnJAWP8Zgv3cfx03fdbcXijNR7CiDfZ 3J/w== X-Received: by 10.28.18.3 with SMTP id 3mr16476438wms.67.1446494480624; Mon, 02 Nov 2015 12:01:20 -0800 (PST) MIME-Version: 1.0 Received: by 10.27.32.201 with HTTP; Mon, 2 Nov 2015 12:01:01 -0800 (PST) From: Ashish Agarwal Date: Mon, 2 Nov 2015 15:01:01 -0500 Message-ID: To: Caml List Content-Type: multipart/alternative; boundary=001a1145bb94aff93f0523943d1b Subject: [Caml-list] substituting recursive types inside a signature --001a1145bb94aff93f0523943d1b Content-Type: text/plain; charset=UTF-8 $ cat foo.ml module M = struct type t = A | B of u and u = C of t end module type N = sig include module type of M with type t = M.t and type u = M.u end $ ocamlc -c foo.ml File "foo.ml", line 8, characters 9-21: Error: This variant or record definition does not match that of type M.t The types for field B are not equal. I guess the "and" in the constraint doesn't make the constraints mutually recursive, so what does it do? --001a1145bb94aff93f0523943d1b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
$ cat foo.ml
module= M =3D struct
=C2=A0 type t =3D A | B of u
=C2=A0 and u= =3D C of t
end

module type N =3D sig
=C2=A0 include module type of M
=C2=A0 =C2=A0 with type t= =3D M.t
=C2=A0 =C2=A0 and type u =3D M.u
end

$ ocamlc -c foo.ml
File "foo.ml", line 8, charac= ters 9-21:
Error: This variant or record definition does not matc= h that of type M.t
=C2=A0 =C2=A0 =C2=A0 =C2=A0The types for field= B are not equal.

I guess the "and" in t= he constraint doesn't make the constraints mutually recursive, so what = does it do?
--001a1145bb94aff93f0523943d1b--