From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.0 required=5.0 tests=AWL,HTML_MESSAGE,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id E5487BBAF for ; Sat, 14 Mar 2009 11:14:46 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoBAL8gu0nRVdypmGdsb2JhbACCUZIwPwEBAQEBCAkMBxGrYY5qAQSDfw X-IronPort-AV: E=Sophos;i="4.38,362,1233529200"; d="scan'208";a="22558156" Received: from mail-fx0-f169.google.com ([209.85.220.169]) by mail2-smtp-roc.national.inria.fr with ESMTP; 14 Mar 2009 11:14:46 +0100 Received: by fxm17 with SMTP id 17so2985628fxm.27 for ; Sat, 14 Mar 2009 03:14:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=8eXfFm5T+yuozpMjzJh5iACUGPvMLnRauT1mttx+L2I=; b=aJXmGt2w92vEXElc+i+Q7Kb5718wOJFoVmxG3oGyLNIxJR0T/lMvzk+uPv4504cimZ PtZxnyVZhg/JrPfZCbq7hrb9OpemVWl8bHTSTNh+BPYRJULjigDWMeQmp0Alxt80AaeM HIYi1+4g4QcGNe9/WVD8cjoq8tw67zVR029yw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=p0ti6lJVKrSa0/qX7DpwetWKQNVbpOemTs/XjeFa1letYDSXpcuBc21xL2H44OPmcM 0xU/BJEGW1jg2r6NzRNK3Ix6/6+TYO+eOTPriIPLurJAk6sGHNKhCdcqtrxoCfxM1/+k xbDjymwt64CxjOvthAEWdeBfpE4R0qICQlKSk= MIME-Version: 1.0 Received: by 10.223.109.20 with SMTP id h20mr1115820fap.41.1237025686114; Sat, 14 Mar 2009 03:14:46 -0700 (PDT) Date: Sat, 14 Mar 2009 11:14:46 +0100 Message-ID: <721f7f5a0903140314saf947b9n1531207146ba2e29@mail.gmail.com> Subject: Commuting labeled arguments From: Philippe Veber To: caml-list@yquem.inria.fr Content-Type: multipart/alternative; boundary=001636c5ac8c9955da0465117cd0 X-Spam: no; 0.00; checker:01 val:01 val:01 checker:01 W6:98 int:01 int:01 behaviour:01 behaviour:01 expression:02 expression:02 caml:02 caml:02 objective:02 objective:02 --001636c5ac8c9955da0465117cd0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi all, is this behaviour of the type checker expected ? Objective Caml version 3.11.0 # let f g x y = g ~x ~y;; val f : (x:'a -> y:'b -> 'c) -> 'a -> 'b -> 'c = # let g ~y ~x = x + y;; val g : y:int -> x:int -> int = # f g;; Error: This expression has type y:int -> x:int -> int but is here used with type x:'a -> y:'b -> 'c If so, I'm tempted to fill a report to mantis anyway, to get this said in the manual (i've not seen anything for this case, but i might have missed something). Philippe. --001636c5ac8c9955da0465117cd0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi all,

is this behaviour of the type checker expected ?

=A0= =A0=A0=A0=A0=A0=A0 Objective Caml version 3.11.0

# let f g x y =3D g= ~x ~y;;
val f : (x:'a -> y:'b -> 'c) -> 'a -&g= t; 'b -> 'c =3D <fun>
# let g ~y ~x =3D x + y;;
val g : y:int -> x:int -> int =3D <fu= n>
# f g;;
Error: This expression has type y:int -> x:int ->= int
=A0=A0=A0=A0=A0=A0 but is here used with type x:'a -> y:'= ;b -> 'c

If so, I'm tempted to fill a report to mantis anyway, to get this s= aid in the manual (i've not seen anything for this case, but i might ha= ve missed something).

Philippe.




--001636c5ac8c9955da0465117cd0--