Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Alex Baretta <alex@barettadeit.com>
To: Ocaml <caml-list@inria.fr>
Subject: Re: [Caml-list] Dummy polymorphic constructors
Date: Fri, 17 Dec 2004 08:42:03 +0100	[thread overview]
Message-ID: <41C28DCB.3050409@barettadeit.com> (raw)
In-Reply-To: <d849ad2a041216143853ab054@mail.gmail.com>

John Prevost wrote:
>>type empty = [ ]

> 
> I'm somewhat confused as to why this is different from simply
> declaring a new opaque type:
> 
> type empty

Ah, this is interesting!

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

Not much, actually. I thought opaque types could only be *declared*.

module M : sig type t end = struct type t = *** end

I never realized that a type could be *defined* as opaque.

module M = struct type t end

Alex

-- 
*********************************************************************
http://www.barettadeit.com/
Baretta DE&IT
A division of Baretta SRL

tel. +39 02 370 111 55
fax. +39 02 370 111 54

Our technology:

The Application System/Xcaml (AS/Xcaml)
<http://www.asxcaml.org/>

The FreerP Project
<http://www.freerp.org/>


  reply	other threads:[~2004-12-17  7:42 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 [this message]
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=41C28DCB.3050409@barettadeit.com \
    --to=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