[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | sclematide@a... |
| 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