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 946617EE49 for ; Tue, 17 Sep 2013 15:10:20 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of gabriel.scherer@gmail.com) identity=pra; client-ip=209.85.214.48; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of gabriel.scherer@gmail.com designates 209.85.214.48 as permitted sender) identity=mailfrom; client-ip=209.85.214.48; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@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-bk0-f48.google.com) identity=helo; client-ip=209.85.214.48; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="postmaster@mail-bk0-f48.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuIBAAlUOFLRVdYwm2dsb2JhbABBGoM/Uq5Dig+IRIEVCBYOAQEBAQEGCwsJFCiCJQEBBAEMGxkBGxILAQMBCwYFBAcaISIBEQEFAQoSBhMSh14BAwkGDDacG4xRgweEJwoZJwMKZIgeAQUMjiqBLQQHhB4Dl3uBL45cGCmETjo X-IPAS-Result: AuIBAAlUOFLRVdYwm2dsb2JhbABBGoM/Uq5Dig+IRIEVCBYOAQEBAQEGCwsJFCiCJQEBBAEMGxkBGxILAQMBCwYFBAcaISIBEQEFAQoSBhMSh14BAwkGDDacG4xRgweEJwoZJwMKZIgeAQUMjiqBLQQHhB4Dl3uBL45cGCmETjo X-IronPort-AV: E=Sophos;i="4.90,923,1371074400"; d="scan'208";a="27143236" Received: from mail-bk0-f48.google.com ([209.85.214.48]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 17 Sep 2013 15:10:20 +0200 Received: by mail-bk0-f48.google.com with SMTP id my13so2117374bkb.21 for ; Tue, 17 Sep 2013 06:10:19 -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=9oU5wLk9KQjpE5LDiJUo4GLXI9tDa49uEAzY9Sfty2U=; b=KITkkOhnoyTs6GGBecaBxAMEY/dVnkUVp83Bw/YbutTspi/FCBodhtv0n+gq8O8kSq D1yRyRj61Eoq3Yjry9IhH+VPGU01D7W7+t/CcAAIdY6AzCe7r0sHlLOh9T3AvbRFzUC+ zZnxd1k2gyCxnfovDCtlvAQjkPo6AEiGPCcZox3SShlj0ebkpnB4DbAxZa9kuCFYCLwp 3FnxP+/oEmarMOfUN8JqSG5gRwbf4JhIU7ANtap9/5/+NSOOLBh2YB+B1Xa+wEjo2VPd fEYsluw1cKNU32Z7g3NX8DP1R+WIc7vMDlI9kW2p2CojaOFQd7XeRKLH5HREU5UCmuUn /X1w== X-Received: by 10.204.63.7 with SMTP id z7mr29038792bkh.23.1379423419298; Tue, 17 Sep 2013 06:10:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.236.193 with HTTP; Tue, 17 Sep 2013 06:09:39 -0700 (PDT) In-Reply-To: <52385142.7030402@etorok.net> References: <52385142.7030402@etorok.net> From: Gabriel Scherer Date: Tue, 17 Sep 2013 15:09:39 +0200 Message-ID: To: =?ISO-8859-1?Q?T=F6r=F6k_Edwin?= Cc: caml users Content-Type: multipart/alternative; boundary=001a11c37828e725f204e6940ae7 Subject: Re: [Caml-list] duplicate labels --001a11c37828e725f204e6940ae7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I think this is also related to http://caml.inria.fr/mantis/view.php?id=3D6070 Note that enabling warning 27 (non-suspicious unused variables) also solves this issue: % ocaml -w +27 OCaml version 4.00.1 # let foo ~x ~x () =3D x;; Warning 27: unused variable x. val foo : x:'a -> x:'b -> unit -> 'b =3D On Tue, Sep 17, 2013 at 2:55 PM, T=F6r=F6k Edwin wrote: > Hi, > > The following is accepted: > > let foo ~x ~x () =3D () > let () =3D > foo ~x:4 ~x:5 () > > I tried -w A and I got no warnings with OCaml 4.01.0, is this intended? > Should I file a feature request to get a warning for this situation? > > (How I got in this situation: I did an overly eager search/replace that > caused the duplicate ~x) > > Best regards, > --Edwin > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > --001a11c37828e725f204e6940ae7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I think this is also related to
=A0 http://caml.inria.fr/mantis/v= iew.php?id=3D6070

Note that enabling warning 27 (non-suspi= cious unused variables) also solves this issue:

=A0% ocaml -w +27
=A0=A0=A0=A0=A0=A0=A0 OCaml version 4.00.1

= # let foo ~x ~x () =3D x;;
Warning 27: unused variable x.
val foo : x= :'a -> x:'b -> unit -> 'b =3D <fun>

=


On Tue,= Sep 17, 2013 at 2:55 PM, T=F6r=F6k Edwin <edwin+ml-ocaml@etorok.n= et> wrote:
Hi,

The following is accepted:

let foo ~x ~x () =3D ()
let () =3D
=A0 foo ~x:4 ~x:5 ()

I tried -w A and I got no warnings with OCaml 4.01.0, is this intended?
Should I file a feature request to get a warning for this situation?

(How I got in this situation: I did an overly eager search/replace that cau= sed the duplicate ~x)

Best regards,
--Edwin

--
Caml-list mailing list. =A0Subscription management and archives:
ht= tps://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

--001a11c37828e725f204e6940ae7--