Date: Mon, 20 Jan 1997 16:31:29 +0100
From: firstname.lastname@example.org (Simon Clematide)
Subject: Constructors in camllight vs. ocaml
Why do camllight and ocaml treat constructors differently?
In camllight I can write
#type ip = Pair of int * int;;
Type ip defined.
and the system recognizes Pair automatically as a value
- : int * int -> ip = <fun>
Doing the same in ocaml (1.03) I get:
# type ip = Pair of int * int;;
type ip = Pair of int * int
The constructor Pair expects 2 argument(s),
but is here applied to 0 argument(s)
I do prefer the behavior of camllight especially for porting SML code.
--- Simon Clematide Stuessistr. 96 CH-8057 Zuerich E-mail: email@example.com Phone: +41 1 361 22 37
This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:09 MET