From: John Prevost <j.prevost@gmail.com>
To: Alex Baretta <alex@barettadeit.com>
Cc: Ocaml <caml-list@inria.fr>
Subject: Re: [Caml-list] Dummy polymorphic constructors
Date: Thu, 16 Dec 2004 17:38:46 -0500 [thread overview]
Message-ID: <d849ad2a041216143853ab054@mail.gmail.com> (raw)
In-Reply-To: <41C1E091.1040508@barettadeit.com>
On Thu, 16 Dec 2004 20:22:57 +0100, Alex Baretta <alex@barettadeit.com> wrote:
> Currently ocaml does not support empty polymorphic variant sum types.
> Say, I cannot write the following.
>
> type empty = [ ]
>
> This fails due to a syntax error rather than a typing error, which is a
> sensible, given that the type expression I have written is actually
> perfectly meaningful.
I'm somewhat confused as to why this is different from simply
declaring a new opaque type:
type empty
Since there is no way to construct a value of the type, nor any way to
deconstruct such a value, how is it different?
John.
next prev parent reply other threads:[~2004-12-16 22:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-16 19:22 Alex Baretta
2004-12-16 22:38 ` John Prevost [this message]
2004-12-17 7:42 ` [Caml-list] " Alex Baretta
2004-12-17 7:59 ` skaller
2004-12-17 1:10 ` Jacques Garrigue
2004-12-17 9:03 ` skaller
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=d849ad2a041216143853ab054@mail.gmail.com \
--to=j.prevost@gmail.com \
--cc=alex@barettadeit.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