caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: sclematide@access.ch (Simon Clematide)
To: caml-list@inria.fr
Subject: Constructors in camllight vs. ocaml
Date: Mon, 20 Jan 1997 16:31:29 +0100	[thread overview]
Message-ID: <v01530500af093c3eab44@[10.0.2.15]> (raw)

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







             reply	other threads:[~1997-01-20 18:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-01-20 15:31 Simon Clematide [this message]
1997-01-30 10:29 ` Xavier Leroy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='v01530500af093c3eab44@[10.0.2.15]' \
    --to=sclematide@access.ch \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).