On Thu, 29 May 2008 18:13:09 -0700, Michael Vanier wrote:
> 
> I realize that this is how it works, but I don't understand why it
> should work this way. AFAIK elsewhere in ocaml "int * int" always
> refers to a tuple.  Similarly, if testme's Foo really took two int
> arguments I would expect to be able to create Foos as "Foo 1 2"
> instead of "Foo (1, 2)" which looks like Foo takes a single tuple
> argument, not two int arguments.  I don't see why "int * int" and
> "(int * int)" are different things.

Curried constructors are available in the revised syntax.  But since
the original syntax uses ``Foo (1, 2)'' for a constructor of 2
arguments, it is declared ``Foo of int * int'' by analogy with
products.  Hence the small glitch you noticed (in general that causes
no problems however).

My 0.02€,
ChriS

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to