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 ESMTPS id 50BEF5D5 for ; Mon, 16 Apr 2018 20:57:30 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.48,460,1517871600"; d="scan'208,217";a="323115093" Received: from sympa.inria.fr ([193.51.193.213]) by mail2-relais-roc.national.inria.fr with ESMTP; 16 Apr 2018 22:57:28 +0200 Received: by sympa.inria.fr (Postfix, from userid 20132) id 211048244B; Mon, 16 Apr 2018 22:57:28 +0200 (CEST) Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 163888240C for ; Mon, 16 Apr 2018 22:57:14 +0200 (CEST) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=angelo@icorsaro.net; spf=None smtp.mailfrom=angelo@icorsaro.net; spf=None smtp.helo=postmaster@mail-wr0-f177.google.com IronPort-PHdr: =?us-ascii?q?9a23=3A4xBkYRJ/KRf/MmpKOtmcpTZWNBhigK39O0sv0rFi?= =?us-ascii?q?tYgRLfvxwZ3uMQTl6Ol3ixeRBMOHs6kC07KempujcFRI2YyGvnEGfc4EfD4+ou?= =?us-ascii?q?JSoTYdBtWYA1bwNv/gYn9yNs1DUFh44yPzahANS47xaFLIv3K98yMZFAnhOgpp?= =?us-ascii?q?POT1HZPZg9iq2+yo9JDffwtFiCChbb9uMR67sRjfus4KjIV4N60/0AHJonxGe+?= =?us-ascii?q?RXwWNnO1eelAvi68mz4ZBu7T1et+ou+MBcX6r6eb84TaFDAzQ9L281/szrugLd?= =?us-ascii?q?QgaJ+3ART38ZkhtMAwjC8RH6QpL8uTb0u+ZhxCWXO9D9QLYpUjqg8qhrUgflhi?= =?us-ascii?q?cbODE27W/ZicJ+grxcrh+6vRNz34vUbZuVNPZifK7Qe84RS2pbXsZWUixMGp+x?= =?us-ascii?q?b40AD+UfOeZYqJT2qkUJrRukHgmjHvnvyjhVjXLxx6I61eshHh/C3AwnBN8OsW?= =?us-ascii?q?jbrNLvNKcJS++11q7IwS/Fb/xIxTfw8Y7FeQ0ir/GURb98b9bdxE01Gw7Gjlic?= =?us-ascii?q?s5HpMy2W2+gXrmSW7ehtWfqxh2E9tw19vz2iyds3hYXViY8Yz1DJ+CZkzIswON?= =?us-ascii?q?G0VVJ3bcKhHZRKtCyXM5d6T8YjTm52uis3xbgLtoK1fCcQzZkqwxDSZvyGfoWO?= =?us-ascii?q?/xntTvyeIS1ii3JgYL+/hwi98UynyuDkU8m7yldKri5cntjCrHABywXf6saaRv?= =?us-ascii?q?Z//EqtwzmP1wfU6uFLJUA7i7DXJIImwr41jpYTsELDETHqmEjukqOaakEp9vKr?= =?us-ascii?q?5unneLnqu4GQOoxuhg3jMKkjmNSzAeEiPQgPW2ib9/681Lrm/UDhWrpKiPI2nb?= =?us-ascii?q?fdsJDdPskbp7K2AwhP0oY48Rm/FTCm3M4enXYZMFJJYAiHgJTxO1HSPPD4Cu+y?= =?us-ascii?q?jEi2nzduw/DKJ7nhApTWLnjfi7rhZrZ860tEyAUp19xf5pRUCqsAIP3pQEPxus?= =?us-ascii?q?bYXVcFNFm/yuPjTdF8zZ82WGSVA6bfPrmBn0WP47cGJeaBYIhdkzHnMPE/4La6?= =?us-ascii?q?hHk2lFsaVaii2oEMYWq/WPJrPxPKMjLXnt4dHDJS7UIFR+vwhQjaCG8BVzOJR6?= =?us-ascii?q?s5owoDJsejBIbHSJqqheXdjiawGYdNb3pBTFaBDSWwLtnWa7I3cCuXZ/RZvHkc?= =?us-ascii?q?T7H4F90g3ha0rwbgzPxhI/aGonRF56Km78B84qjorT939TFwCJ7DgWSETmUxgX?= =?us-ascii?q?lQAjFvg/85rkt6xVOOl6N/hq4AGA=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0C7CAB1DdVahrGAVdFdgyCBS4ELgyg/i?= =?us-ascii?q?GCMNoMDjX6GDwNTC4dJGQYGNRMBAgEBAQEBAQEBARMBAQEICwsIKCMMgjUigl4?= =?us-ascii?q?XHQEBOBgGPgI2AQUBhUIBikqPfzyKGG2CHIJuAQEFgWKDaoIdCAkBCId0ghOBM?= =?us-ascii?q?oI7ASyFP4I0MIIkhzaQMAiBNY1ihlyFE41OgioCBAIEBQIFDyGBBDSBcjMaCCY?= =?us-ascii?q?KZQGCGD6BcINOilRtAY4vAQE?= X-IPAS-Result: =?us-ascii?q?A0C7CAB1DdVahrGAVdFdgyCBS4ELgyg/iGCMNoMDjX6GDwN?= =?us-ascii?q?TC4dJGQYGNRMBAgEBAQEBAQEBARMBAQEICwsIKCMMgjUigl4XHQEBOBgGPgI2A?= =?us-ascii?q?QUBhUIBikqPfzyKGG2CHIJuAQEFgWKDaoIdCAkBCId0ghOBMoI7ASyFP4I0MII?= =?us-ascii?q?khzaQMAiBNY1ihlyFE41OgioCBAIEBQIFDyGBBDSBcjMaCCYKZQGCGD6BcINOi?= =?us-ascii?q?lRtAY4vAQE?= X-IronPort-AV: E=Sophos;i="5.48,460,1517871600"; d="scan'208,217";a="262248846" Received: from mail-wr0-f177.google.com ([209.85.128.177]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 16 Apr 2018 22:57:13 +0200 Received: by mail-wr0-f177.google.com with SMTP id y7so29706340wrh.10 for ; Mon, 16 Apr 2018 13:57:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icorsaro-net.20150623.gappssmtp.com; s=20150623; h=from:mime-version:subject:message-id:date:to; bh=elwbbAe2gTC20Z8c1ctmfy+XIg1n95IKgRLX/Ct5OqE=; b=qIjfkuXWdum3OVa1VGgUuR0AZ89q4xy7Q1WDhyozsBCa60WuZvDe9lvfMj7LQ4t7AA FvW/Vqc+zhysMiRWkQGZJhsJhEW24d+ruEh0S1XKdYZ1PszR+1CGlep/NgkwFKHGd9G/ Qli3HwLOLFy+GdsSTDkgZ74MG9YI+IpUR0IXwt3dMje17v4qRSqZguT3JbEnE6YhW9C1 Q3Htsy952n3++zyaFeY5sjbJtrppwdSvMDNXCeic45nObpssTZ2FZWjgVoLydNKPUd31 HfVzoD5GctdDV8XX3O1oq72xe5Q/E6adybOoQQw29rrjukpI8cy0lrcpREn8xFGBpRvf 9nFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:message-id:date:to; bh=elwbbAe2gTC20Z8c1ctmfy+XIg1n95IKgRLX/Ct5OqE=; b=e2CUfBH1Gd/+lhhwsSxN94ULt0H6SGVLDC5AV9xnXg6WwAAQs/gvMCfKHd+Thj4BDm 9L/rUKkKXxxJlnYzp0ldEpAsLjDKloIfq8pRfmtOII9gflB9SvM59/5PMEE9C2hVtAvE G9jkJecZBU4Ur2kg3OCRfO/DqDpK7UENqrbqRAMKuGiE70g7OMXt4FZBMMWZ58kQKhsU qIz/58du8xsHF3hLh+3X1vpATlDs7pxTJP4gAWvh7zfwlnfPsq486175f2rIpFJOSahK fEJ8ZdBYsymN5hCJGmrJ6ruuB96hL3+VMLSxfsC4wqfId5fdXmcOlX7jsbQ4bT/6+0n4 e9Cg== X-Gm-Message-State: ALQs6tBi/mvEQ9xhcPOfMxuuJw0JtpIz70ztNC/Tdx09lj7u3jVFl9Zb RcqEcpfsek1d8H2D4Q9ZPsFNF2VCv2g= X-Google-Smtp-Source: AIpwx495lciVD1ZV02O8AeFAhzyzC34mOLKvVplkj2RM96qP6rrMhAeIDDtY0DNZOc91NbTkQCjb4A== X-Received: by 10.28.124.14 with SMTP id x14mr2293077wmc.86.1523912232725; Mon, 16 Apr 2018 13:57:12 -0700 (PDT) Received: from 2a01cb0405811100a8906e740cfa9356.ipv6.abo.wanadoo.fr (2a01cb0405811100a8906e740cfa9356.ipv6.abo.wanadoo.fr. [2a01:cb04:581:1100:a890:6e74:cfa:9356]) by smtp.gmail.com with ESMTPSA id f22sm8082824wmc.3.2018.04.16.13.57.11 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Apr 2018 13:57:11 -0700 (PDT) From: Angelo Corsaro Content-Type: multipart/alternative; boundary="Apple-Mail=_21548514-2003-4F88-8C52-28A9ACABCB86" Mime-Version: 1.0 (Mac OS X Mail 11.3 \(3445.6.18\)) Message-Id: Date: Mon, 16 Apr 2018 22:57:11 +0200 To: caml-list@inria.fr X-Mailer: Apple Mail (2.3445.6.18) Subject: [Caml-list] Recursive record initialisation Reply-To: Angelo Corsaro X-Loop: caml-list@inria.fr X-Sequence: 16822 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: --Apple-Mail=_21548514-2003-4F88-8C52-28A9ACABCB86 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hello, I have a question concerning the initialisation of mutually recursive reco= rd types. As a trivial example consider the following type declaration: type atype =3D { b : btype; } and btype =3D { a : atype; } This is a legal type declaration (it type-checks w/o a blink), but I can=E2= =80=99t see how such a type would be initialised? As both =E2=80=9Ca" and = =E2=80=9Cb=E2=80=9D are values there is an apparent bootstrapping issue. Bu= t as this is a legal type declaration I guess there is a way around, wonder= ing what the right way is. Thanks very much in advance for any clarification. =E2=80=94Angelo =20 =E2=80=94 =E2=80=9CSimplicity is the ultimate sophistication." ~ Leonardo da Vinci --=20 Caml-list mailing list. Subscription management and archives: https://sympa.inria.fr/sympa/arc/caml-list Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs= --Apple-Mail=_21548514-2003-4F88-8C52-28A9ACABCB86 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hello,

I have a question concerning the initialisation of m= utually recursive record types. As a trivial example consider the following= type declaration:

type atype =3D { b : btype; }
and btype =3D { a : atype; }

This is a legal type declaration (it type-checks w= /o a blink), but I can=E2=80=99t see how such a type would be initialised? = As both =E2=80=9Ca" and =E2=80=9Cb=E2=80=9D are values there is an apparent= bootstrapping issue. But as this is a legal type declaration I guess there= is a way around, wondering what the right way is.
Thanks very much in advance for any clari= fication.

=E2=80= =94Angelo
 

<= /div>


=E2=80=94
<= /div>
=E2=80=9CSimplicity is the ultimate sophistication." ~ Leonardo da Vinci
<= /div>

= --Apple-Mail=_21548514-2003-4F88-8C52-28A9ACABCB86--