Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: skaller <skaller@users.sourceforge.net>
To: John Prevost <j.prevost@gmail.com>
Cc: Alex Baretta <alex@barettadeit.com>, Ocaml <caml-list@inria.fr>
Subject: Re: [Caml-list] Dummy polymorphic constructors
Date: 17 Dec 2004 18:59:37 +1100	[thread overview]
Message-ID: <1103270377.15260.27.camel@pelican.wigram> (raw)
In-Reply-To: <d849ad2a041216143853ab054@mail.gmail.com>

On Fri, 2004-12-17 at 09:38, John Prevost wrote:
> 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 = [ ]

> 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?

Polymorphic variants are extensible and algebraic .. 
an abstract type is neither.

-- 
John Skaller, mailto:skaller@users.sf.net
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language http://felix.sf.net




  parent reply	other threads:[~2004-12-17  7:59 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 ` [Caml-list] " John Prevost
2004-12-17  7:42   ` Alex Baretta
2004-12-17  7:59   ` skaller [this message]
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=1103270377.15260.27.camel@pelican.wigram \
    --to=skaller@users.sourceforge.net \
    --cc=alex@barettadeit.com \
    --cc=caml-list@inria.fr \
    --cc=j.prevost@gmail.com \
    /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