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 4D2EA7EF10 for ; Mon, 9 Mar 2015 14:37:19 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of alain.frisch@lexifi.com) identity=pra; client-ip=85.233.204.164; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="alain.frisch@lexifi.com"; x-sender="alain.frisch@lexifi.com"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of alain.frisch@lexifi.com) identity=mailfrom; client-ip=85.233.204.164; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="alain.frisch@lexifi.com"; x-sender="alain.frisch@lexifi.com"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mx20.yaziba.net) identity=helo; client-ip=85.233.204.164; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="alain.frisch@lexifi.com"; x-sender="postmaster@mx20.yaziba.net"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CBAAD4oP1UnKTM6VVahnZGwwCCUQKBJk0BAQEBAQEQAQEBAQEICwkJFC6EDwEBAQMBDBcVQAYLCQIYAgIFFgsCAgkDAgECAUUGAQwIAQGIIwyLW5xumx4BCgEBAR6BIYl2hDs6gmiBRQWZYoZ1jH0ChBKDMQEBAQ X-IPAS-Result: A0CBAAD4oP1UnKTM6VVahnZGwwCCUQKBJk0BAQEBAQEQAQEBAQEICwkJFC6EDwEBAQMBDBcVQAYLCQIYAgIFFgsCAgkDAgECAUUGAQwIAQGIIwyLW5xumx4BCgEBAR6BIYl2hDs6gmiBRQWZYoZ1jH0ChBKDMQEBAQ X-IronPort-AV: E=Sophos;i="5.11,367,1422918000"; d="scan'208";a="102616228" Received: from mx20.yaziba.net ([85.233.204.164]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 09 Mar 2015 14:37:18 +0100 Received: from mta10.int.yaziba.net (unknown [10.4.20.30]) by mx20.yaziba.net (mx10.yaziba.net) with ESMTP id 3BADD1A74EA; Mon, 9 Mar 2015 14:37:17 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mta10.int.yaziba.net (Postfix) with ESMTP id 627ACC0746; Mon, 9 Mar 2015 14:37:17 +0100 (CET) X-Virus-Scanned: amavisd-new at mta10.int.yaziba.net Received: from mta10.int.yaziba.net ([127.0.0.1]) by localhost (mta10.int.yaziba.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fBhOYWe_RJ90; Mon, 9 Mar 2015 14:37:17 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mta10.int.yaziba.net (Postfix) with ESMTP id 35AC1C070D; Mon, 9 Mar 2015 14:37:17 +0100 (CET) X-Virus-Scanned: amavisd-new at mta10.int.yaziba.net Received: from mta10.int.yaziba.net ([127.0.0.1]) by localhost (mta10.int.yaziba.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id GF5UAaQCX0rV; Mon, 9 Mar 2015 14:37:17 +0100 (CET) Received: from [10.0.48.192] (unknown [185.23.92.144]) by mta10.int.yaziba.net (Postfix) with ESMTPSA id 0D275CA655; Mon, 9 Mar 2015 14:37:17 +0100 (CET) Message-ID: <54FDA20D.1000503@lexifi.com> Date: Mon, 09 Mar 2015 14:37:17 +0100 From: Alain Frisch Organization: LexiFi User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Maxence Guesdon , caml-list@inria.fr References: <54FD8397.2060002@lexifi.com> <20150309141625.0da29f2b@alcazar2> In-Reply-To: <20150309141625.0da29f2b@alcazar2> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-DRWEB-SCAN: ok X-VRSPAM-SCORE: -100 X-VRSPAM-STATE: legit X-VRSPAM-CAUSE: gggruggvucftvghtrhhoucdtuddrfeejledrheekgdehiecutefuodetggdotefrucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepkfffhfhofgggvffufhgjtgfgsehtqhgrtddtfeejnecuhfhrohhmpeetlhgrihhnucfhrhhishgthhcuoegrlhgrihhnrdhfrhhishgthheslhgvgihifhhirdgtohhmqe X-VRSPAM-EXTCAUSE: mhhouggvpehsmhhtphhouhht Subject: Re: [Caml-list] Changing precedence and placement of attributes On 03/09/2015 02:16 PM, Maxence Guesdon wrote: > I'm quite "shocked" as it becomes inconsistent with other precedences > in type definitions. By now > int * int list > is parsed as > int * (int list) > and not as > (int * int) list > > I would expect attributes to be associated the same way. Attributes really don't behave as type constructors; for instance, (int, int) [@foo] is not allowed in type expressions. I'd be more concerned about how attributes behave across various=20 syntactic categories for similarly looking fragments. For instance, in=20 expressions x * y [@foo] is already currently parsed as (x * y) [@foo] But - "x, y [@foo]" is parsed as "x, (y [@foo])" - "x * y [@foo] * z" is accepted as an expression, and parsed as "(x *=20 y)[@foo] * z". > How would be parsed the following: > int * int [@foo] * int > ? This would be rejected. Doing the same as for expression would be=20 weird, since * is a n-ary construction in types, not a binary operator. (Note: J=C3=A9r=C3=A9mie prepared a nice table in his pull request 152 on G= ithub;=20 it shows how various forms are interpreted currently and after the change.) Alain