caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Stephen Dolan <stephen.dolan@cl.cam.ac.uk>
To: Andreas Rossberg <rossberg@mpi-sws.org>
Cc: Gabriel Scherer <gabriel.scherer@gmail.com>,
	Julien Blond <julien.blond@gmail.com>,
	 David Allsopp <dra-news@metastack.com>,
	OCaml mailing-list <caml-list@inria.fr>
Subject: Re: [Caml-list] Empty polymorphic variant set
Date: Fri, 25 Nov 2016 16:50:19 +0000	[thread overview]
Message-ID: <CA+mHimNSxnZp3AgxYZkzSq3y1DH_XsB65_pzFbyNPBJu_qSuTA@mail.gmail.com> (raw)
In-Reply-To: <3AD797C1-47D8-4521-9CEF-03D12CDF6867@mpi-sws.org>

[-- Attachment #1: Type: text/plain, Size: 716 bytes --]

On Fri, Nov 25, 2016 at 1:52 PM, Andreas Rossberg <rossberg@mpi-sws.org>
wrote:

>
> > On Nov 25, 2016, at 14:46 , Gabriel Scherer <gabriel.scherer@gmail.com>
> wrote:
> >
> > I would agree that OCaml lacks a convenient way to define the empty
> > type.
>
> Isn’t
>
>   type empty
>
> (as a definition) a sufficiently convenient way to define an empty type?
>

I agree that that defines the empty type, but OCaml disagrees. OCaml takes
that as declaring an abstract type, just as if you'd included a module
exposing an opaque type. So, the compiler won't conclude that 'empty' is
actually an empty type (viewing it as an unknown abstract type), nor will
it refute (int, empty) eq.

Stephen

[-- Attachment #2: Type: text/html, Size: 1164 bytes --]

  parent reply	other threads:[~2016-11-25 16:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-25  8:39 Julien Blond
2016-11-25  9:19 ` Ben Millwood
2016-11-25  9:20 ` Julien Blond
2016-11-25 11:22   ` David Allsopp
2016-11-25 13:01     ` Julien Blond
2016-11-25 13:46       ` Gabriel Scherer
2016-11-25 13:52         ` Andreas Rossberg
2016-11-25 15:42           ` Markus Mottl
2016-11-25 15:46           ` Gabriel Scherer
2016-11-25 15:59             ` Yaron Minsky
2016-11-25 16:42               ` Markus Mottl
2016-11-25 17:11                 ` Gabriel Scherer
2016-11-25 16:50           ` Stephen Dolan [this message]
2016-11-25 16:59             ` Jeremy Yallop

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=CA+mHimNSxnZp3AgxYZkzSq3y1DH_XsB65_pzFbyNPBJu_qSuTA@mail.gmail.com \
    --to=stephen.dolan@cl.cam.ac.uk \
    --cc=caml-list@inria.fr \
    --cc=dra-news@metastack.com \
    --cc=gabriel.scherer@gmail.com \
    --cc=julien.blond@gmail.com \
    --cc=rossberg@mpi-sws.org \
    /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).