From: Damien Doligez <damien.doligez@inria.fr>
To: caml users <caml-list@inria.fr>
Subject: Re: [Caml-list] syntax question
Date: Fri, 30 May 2008 14:17:49 +0200 [thread overview]
Message-ID: <8441D806-117E-4FB8-8771-C76A6973A055@inria.fr> (raw)
In-Reply-To: <483F54A5.4020808@cs.caltech.edu>
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
prev parent reply other threads:[~2008-05-30 12:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-29 22:23 Michael Vanier
2008-05-30 0:32 ` [Caml-list] " Adam Granicz
2008-05-30 1:13 ` Michael Vanier
2008-05-30 1:48 ` Adam Granicz
2008-05-30 1:54 ` Gordon Henriksen
2008-05-30 7:03 ` Christophe TROESTLER
2008-05-30 7:06 ` Luc Maranget
2008-05-30 12:17 ` Damien Doligez [this message]
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=8441D806-117E-4FB8-8771-C76A6973A055@inria.fr \
--to=damien.doligez@inria.fr \
--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).