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