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 AC8107EE51 for ; Tue, 21 May 2013 10:25:10 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of alain@frisch.fr) identity=pra; client-ip=193.252.23.214; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="alain@frisch.fr"; x-sender="alain@frisch.fr"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of alain@frisch.fr) identity=mailfrom; client-ip=193.252.23.214; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="alain@frisch.fr"; x-sender="alain@frisch.fr"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@msa.smtpout.orange.fr) identity=helo; client-ip=193.252.23.214; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="alain@frisch.fr"; x-sender="postmaster@msa.smtpout.orange.fr"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkACAMoum1HB/BfWcmdsb2JhbABZgzm+YoJsgSEOAQwIDAkUAyWCHwEBBThAEQsYCRYPCQMCAQIBRQYBDAgBAYgNu3WNeYEvg1QDlziGHo4z X-IPAS-Result: AkACAMoum1HB/BfWcmdsb2JhbABZgzm+YoJsgSEOAQwIDAkUAyWCHwEBBThAEQsYCRYPCQMCAQIBRQYBDAgBAYgNu3WNeYEvg1QDlziGHo4z X-IronPort-AV: E=Sophos;i="4.87,713,1363129200"; d="scan'208";a="18269705" Received: from msa05.smtpout.orange.fr (HELO msa.smtpout.orange.fr) ([193.252.23.214]) by mail2-smtp-roc.national.inria.fr with ESMTP; 21 May 2013 10:25:10 +0200 Received: from [192.168.1.108] ([86.195.25.40]) by mwinf5d44 with ME id eYR91l00F0ruiWm03YR9uP; Tue, 21 May 2013 10:25:10 +0200 Message-ID: <519B2F64.6070805@frisch.fr> Date: Tue, 21 May 2013 10:25:08 +0200 From: Alain Frisch User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:21.0) Gecko/20100101 Thunderbird/21.0 MIME-Version: 1.0 To: Dario Teixeira , OCaml mailing-list References: <1369060290.43256.YahooMailNeo@web120405.mail.ne1.yahoo.com> In-Reply-To: <1369060290.43256.YahooMailNeo@web120405.mail.ne1.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] The rec/nonrec debate On 05/20/2013 04:31 PM, Dario Teixeira wrote: > The unrecursiveness of type declarations is cause for some chagrin, as a > recent ticket on Mantis demonstrates [1]. As I explain on this Mantis ticket, I don't believe that the implicit recursiveness of type declarations is the real cause of the problem. The same problem would still exist if the type declarations were non-recursive by default or if we add a "nonrec" modifier. Consider: type t = X | Y module M = struct type t = A | B type s = { foo: (* I cannot refer to the outer "t" *); bar: t } end What's missing, in my opinion, is not really a way to control recursiveness of type declarations, but rather to refer to components from outer scopes. Alain