Browse thread
Dummy polymorphic constructors
-
Alex Baretta
-
John Prevost
- Alex Baretta
- skaller
- Jacques Garrigue
-
John Prevost
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2004-12-17 (07:42) |
From: | Alex Baretta <alex@b...> |
Subject: | Re: [Caml-list] Dummy polymorphic constructors |
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/>