caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Lukasz Stafiniak <lukstafi@gmail.com>
To: Goswin von Brederlow <goswin-v-b@web.de>
Cc: Caml <caml-list@inria.fr>
Subject: Re: [Caml-list] duplicate labels
Date: Thu, 19 Sep 2013 12:39:59 +0200	[thread overview]
Message-ID: <CAJMfKEU5NSkjJZD8eQs-OO0B4ShiR3GZWP8z-vZhPLXc-vRyLA@mail.gmail.com> (raw)
In-Reply-To: <20130919092913.GB25801@frosties>

[-- Attachment #1: Type: text/plain, Size: 595 bytes --]

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.

[-- Attachment #2: Type: text/html, Size: 971 bytes --]

      reply	other threads:[~2013-09-19 10:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-17 12:55 Török Edwin
2013-09-17 13:01 ` Lukasz Stafiniak
2013-09-17 13:09 ` Gabriel Scherer
2013-09-17 13:49   ` Török Edwin
2013-09-19  9:29     ` Goswin von Brederlow
2013-09-19 10:39       ` Lukasz Stafiniak [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJMfKEU5NSkjJZD8eQs-OO0B4ShiR3GZWP8z-vZhPLXc-vRyLA@mail.gmail.com \
    --to=lukstafi@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=goswin-v-b@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).