Constructors in camllight vs. ocaml

From: Simon Clematide (sclematide@access.ch)
Date: Mon Jan 20 1997 - 16:31:29 MET


Message-Id: <v01530500af093c3eab44@[10.0.2.15]>
Date: Mon, 20 Jan 1997 16:31:29 +0100
To: caml-list@inria.fr
From: sclematide@access.ch (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
    #Pair;;
    - : 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
        # Pair;;
        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

---
Simon Clematide
Stuessistr. 96
CH-8057 Zuerich
E-mail: sclematide@access.ch
Phone: +41 1 361 22 37



This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:09 MET