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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id C8A787EEFA for ; Fri, 13 Nov 2015 14:46:57 +0100 (CET) IronPort-PHdr: 9a23:OZs6shwKRmknyLvXCy+O+j09IxM/srCxBDY+r6Qd0ewUIJqq85mqBkHD//Il1AaPBtWGra8dwLaH+4nbGkU+or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6anHS+4HYoFwnlMkItf6KuStOU0p38i7H60qaQSjsLrQL1Wal1IhSyoFeZnegtqqwmFJwMzADUqGBDYeVcyDAgD1uSmxHh+pX4p8Y7oGwD884mosVJVKGyYr81V6cQWD8vNmRw4MzwqTHCSxGO7z0SSDNFvABPBl3u7Av7RYv2qivNlnRy1TPSacb2V7EvRTO67+FrTxLnhT0vKyN8+mzNjs12yq5W9kHy7ydjypLZNdnGfMF1ebnQKIsX Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=christoph.hoeger@tu-berlin.de; spf=None smtp.mailfrom=christoph.hoeger@tu-berlin.de; spf=None smtp.helo=postmaster@mail.tu-berlin.de Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of christoph.hoeger@tu-berlin.de) identity=pra; client-ip=130.149.7.33; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="christoph.hoeger@tu-berlin.de"; x-sender="christoph.hoeger@tu-berlin.de"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of christoph.hoeger@tu-berlin.de) identity=mailfrom; client-ip=130.149.7.33; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="christoph.hoeger@tu-berlin.de"; x-sender="christoph.hoeger@tu-berlin.de"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail.tu-berlin.de) identity=helo; client-ip=130.149.7.33; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="christoph.hoeger@tu-berlin.de"; x-sender="postmaster@mail.tu-berlin.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0B5AAAx6UVWnCEHlYJehH3AOYYQAoE6PBABAQEBAQEBARABAQEBAQgLCQkhLoItgggBAQQjDwFFEQsaAgUWCwICCQMCAQIBRQYNBgIBAYgqBLA/kFctgQGKUYd1gUQFlkiWQJMsOIJSgV5xhT0BAQE X-IPAS-Result: A0B5AAAx6UVWnCEHlYJehH3AOYYQAoE6PBABAQEBAQEBARABAQEBAQgLCQkhLoItgggBAQQjDwFFEQsaAgUWCwICCQMCAQIBRQYNBgIBAYgqBLA/kFctgQGKUYd1gUQFlkiWQJMsOIJSgV5xhT0BAQE X-IronPort-AV: E=Sophos;i="5.20,287,1444687200"; d="scan'208";a="153727703" Received: from mail.tu-berlin.de ([130.149.7.33]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2015 14:46:57 +0100 X-tubIT-Incoming-IP: 91.65.128.77 Received: from ip5b41804d.dynamic.kabel-deutschland.de ([91.65.128.77] helo=[192.168.178.42]) by mail.tu-berlin.de (exim-4.76/mailfrontend-6) with esmtpsa [UNKNOWN:AES128-SHA:128] for id 1ZxEgp-00072L-5W; Fri, 13 Nov 2015 14:46:56 +0100 From: =?UTF-8?Q?Christoph_H=c3=b6ger?= To: caml users References: <5645DC49.7050106@tu-berlin.de> <5645E255.5060900@freenet.de> Organization: =?UTF-8?Q?Technische_Universit=c3=a4t_Berlin?= Message-ID: <5645E9CF.4070104@tu-berlin.de> Date: Fri, 13 Nov 2015 14:46:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2015.11.13.134217 X-PMX-Spam: Gauge=IIIIIII, Probability=0%, Report='' Subject: Re: [Caml-list] Cyclic type abbreviation Am 13.11.2015 um 14:37 schrieb David Allsopp: >> Summary: what is supposedly wrong with it? > > I expect that what is wrong is that you can write: > > type node = int * tree * tree > and tree = Some of node > | None > > I don't know why you can't write [and tree = node option] instead. Exactly, I do not understand why the builtin type option is handled differently from a self-defined algebraic data type. I have a vague understanding that the acyclic-property is sufficient for termination of some operations on recursive types, but I wonder if option is just missing a definition in the stdlib (so I could write a manifest, if that would solve the issue) or if it is really something special. -- Christoph Höger Technische Universität Berlin Fakultät IV - Elektrotechnik und Informatik Übersetzerbau und Programmiersprachen Sekr. TEL12-2, Ernst-Reuter-Platz 7, 10587 Berlin Tel.: +49 (30) 314-24890 E-Mail: christoph.hoeger@tu-berlin.de