From: "Vesa Karvonen" <vesa_karvonen@hotmail.com>
To: caml-list@inria.fr
Subject: [Caml-list] Overlapping features of variant types and tuples in Ocaml
Date: Thu, 16 May 2002 20:04:18 +0300 [thread overview]
Message-ID: <F2470BwSNsiXxfzhBwS00017f62@hotmail.com> (raw)
Consider the following code:
type variant =
| Tuple of (int * int)
| Non_tuple of int * int
let contents variant =
match variant with
| Tuple x ->
x
| Non_tuple x ->
x
As you can tell, the above code does not compile with Ocaml 3.04:
The constructor Non_tuple expects 2 argument(s),
but is here applied to 1 argument(s)
Is there a good reason for this behaviour or would it be purely
beneficial to remove the special handling of type lists in variants?
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
next reply other threads:[~2002-05-16 17:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-16 17:04 Vesa Karvonen [this message]
2002-05-16 19:17 ` Daniel de Rauglaudre
2002-05-17 8:17 ` Marc Pantel
2002-05-16 19:45 Vesa Karvonen
2002-05-16 19:57 ` Daniel de Rauglaudre
2002-05-17 11:40 ` Luc Maranget
2002-05-16 22:02 Vesa Karvonen
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=F2470BwSNsiXxfzhBwS00017f62@hotmail.com \
--to=vesa_karvonen@hotmail.com \
--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).