From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id CB220BB91 for ; Thu, 16 Dec 2004 23:38:48 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id iBGMcmJT010172 for ; Thu, 16 Dec 2004 23:38:48 +0100 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id XAA00543 for ; Thu, 16 Dec 2004 23:38:48 +0100 (MET) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.201]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id iBGMclZn018749 for ; Thu, 16 Dec 2004 23:38:47 +0100 Received: by wproxy.gmail.com with SMTP id 57so70432wri for ; Thu, 16 Dec 2004 14:38:47 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=SmYRXnZppi8qKSVWisOpkVsbXBvb6iD4t2PL7wzCqxlNWLHUM2OHjiTO5D5q9iOOcT0PuRrOcUfaPTYBu8BRSFfGJcmbgRIEVavnsC21ioKPMsAKa+AdKQaLGDdmnm1LYKxbXGpTdOIWZJgkSj8Pza76rg/09UcLs4X4Y2z6Z7Q= Received: by 10.54.18.35 with SMTP id 35mr1313974wrr; Thu, 16 Dec 2004 14:38:46 -0800 (PST) Received: by 10.54.22.77 with HTTP; Thu, 16 Dec 2004 14:38:46 -0800 (PST) Message-ID: Date: Thu, 16 Dec 2004 17:38:46 -0500 From: John Prevost Reply-To: John Prevost To: Alex Baretta Subject: Re: [Caml-list] Dummy polymorphic constructors Cc: Ocaml In-Reply-To: <41C1E091.1040508@barettadeit.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <41C1E091.1040508@barettadeit.com> X-Miltered: at concorde with ID 41C20E78.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 41C20E77.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; prevost:01 prevost:01 caml-list:01 constructors:01 baretta:01 wrote:01 ocaml:01 syntax:01 polymorphic:01 polymorphic:01 expression:01 typing:01 opaque:01 variant:02 declaring:02 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.0 X-Spam-Level: On Thu, 16 Dec 2004 20:22:57 +0100, Alex Baretta wrote: > Currently ocaml does not support empty polymorphic variant sum types. > Say, I cannot write the following. > > type empty = [ ] > > This fails due to a syntax error rather than a typing error, which is a > sensible, given that the type expression I have written is actually > perfectly meaningful. 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? John.