On 2008-05-30, at 03:13, 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.

Almost, but not quite:

  # let int = 2;;
  val int : int = 2
  # int * int;;
  - : int = 4

Seriously, it's only an ergonomy problem in the syntax of type definitions.
Some better alternatives would be:

  type testme = Foo (int, int);;

or, if you like keyword-oriented syntax:

  type testme = Foo of int and int;;

But in any case, it's way too late to fix this problem now, so we have to
live with it, at least in the classic syntax.

-- Damien

_______________________________________________
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