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 8C9907EE49 for ; Thu, 19 Sep 2013 12:40:22 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of lukstafi@gmail.com) identity=pra; client-ip=209.85.212.52; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="lukstafi@gmail.com"; x-sender="lukstafi@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of lukstafi@gmail.com designates 209.85.212.52 as permitted sender) identity=mailfrom; client-ip=209.85.212.52; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="lukstafi@gmail.com"; x-sender="lukstafi@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-vb0-f52.google.com) identity=helo; client-ip=209.85.212.52; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="lukstafi@gmail.com"; x-sender="postmaster@mail-vb0-f52.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AksCANjTOlLRVdQ0lGdsb2JhbABbhBHBLIEaCBYOAQEBAQcLCwkSKoIcCQEBBAEnGQEbHQEDDAYFAwEHOyIBEQEFARwGE4dwAQMJBptujFGDB4QOChknDRVPiHgBBQyPWweEHgOUH4NdkAwYKYROOg X-IPAS-Result: AksCANjTOlLRVdQ0lGdsb2JhbABbhBHBLIEaCBYOAQEBAQcLCwkSKoIcCQEBBAEnGQEbHQEDDAYFAwEHOyIBEQEFARwGE4dwAQMJBptujFGDB4QOChknDRVPiHgBBQyPWweEHgOUH4NdkAwYKYROOg X-IronPort-AV: E=Sophos;i="4.90,936,1371074400"; d="scan'208";a="27390218" Received: from mail-vb0-f52.google.com ([209.85.212.52]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 19 Sep 2013 12:40:21 +0200 Received: by mail-vb0-f52.google.com with SMTP id f12so6368894vbg.11 for ; Thu, 19 Sep 2013 03:40:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=MRJy77VoOu0GdsyZfZg4u0va3kOPtxFfaGjY6TU8MY4=; b=GMWALZ7H31QcO2GLoxuaRSzVGot1BgQ5+X/tlYK5rEnjnn1NXoHQbq3uF76j+oYiMW c7+vgQ72TfGeVE6FBbYg+Z0u/UiCVrNVkbFymepF7jXbxU7On5wk8wWvfmeJQRznA1eC lBIQtZkCO6APzC16a72QKbGdaMyjDaowpgUVCafvoNK0fJWtR+6jyWwUsE7dqm7HYdO5 7Pz+9KBrQhhdS/RGxqdgnDNwyyOvQPJ2Mcitennc2zdRcdCq2dPZfH4u/tcCpQ9VbOuF Cvp1SVFm5Tjt4TeOjiztuWyRfUDNQ3+R4HBk2cJHL+Ci5p1cAmOz9Q8c1AKHC3jWovwI 90QA== X-Received: by 10.58.134.16 with SMTP id pg16mr271814veb.21.1379587219955; Thu, 19 Sep 2013 03:40:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.191.5 with HTTP; Thu, 19 Sep 2013 03:39:59 -0700 (PDT) In-Reply-To: <20130919092913.GB25801@frosties> References: <52385142.7030402@etorok.net> <52385DFF.40806@etorok.net> <20130919092913.GB25801@frosties> From: Lukasz Stafiniak Date: Thu, 19 Sep 2013 12:39:59 +0200 Message-ID: To: Goswin von Brederlow Cc: Caml Content-Type: multipart/alternative; boundary=089e012949202eaf0f04e6ba2e9d Subject: Re: [Caml-list] duplicate labels --089e012949202eaf0f04e6ba2e9d Content-Type: text/plain; charset=ISO-8859-1 On Thu, Sep 19, 2013 at 11:29 AM, Goswin von Brederlow wrote: > > What about this code? > > # let foo y ~x = 2 * x + y;; > val foo : int -> x:int -> int = > # let bar ~x = foo x;; > val bar : x:int -> x:int -> int = > # let x = 1;; > val x : int = 1 > # bar ~x ~x;; > - : int = 3 > # bar ~x:1 ~x:2;; > - : int = 5 > > Other than being confusing there doesn't seem to be anything wrong with > a duplicate label. It just requires you to apply the ~x in order. > > I believe it is not a type system-level feature wish, but a syntax of definition-level feature wish. --089e012949202eaf0f04e6ba2e9d Content-Type: text/html; charset=ISO-8859-1
On Thu, Sep 19, 2013 at 11:29 AM, Goswin von Brederlow <goswin-v-b@web.de> wrote:

What about this code?

# let foo y ~x = 2 * x + y;;
val foo : int -> x:int -> int = <fun>
# let bar ~x = foo x;;
val bar : x:int -> x:int -> int = <fun>
# let x = 1;;
val x : int = 1
# bar ~x ~x;;
- : int = 3
# bar ~x:1 ~x:2;;
- : int = 5

Other than being confusing there doesn't seem to be anything wrong with
a duplicate label. It just requires you to apply the ~x in order.

I believe it is not a type system-level feature wish, but a syntax of definition-level feature wish.
--089e012949202eaf0f04e6ba2e9d--