caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Commuting labeled arguments
@ 2009-03-14 10:14 Philippe Veber
  2009-03-14 14:43 ` [Caml-list] " Martin Jambon
  0 siblings, 1 reply; 2+ messages in thread
From: Philippe Veber @ 2009-03-14 10:14 UTC (permalink / raw)
  To: caml-list

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

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 = <fun>
# let g ~y ~x = x + y;;
val g : y:int -> x:int -> int = <fun>
# 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.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-03-14 14:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-14 10:14 Commuting labeled arguments Philippe Veber
2009-03-14 14:43 ` [Caml-list] " Martin Jambon

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).