From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA20347; Mon, 25 Oct 2004 15:21:23 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 PAA19955 for ; Mon, 25 Oct 2004 15:21:22 +0200 (MET DST) Received: from [128.93.8.158] (macaque.inria.fr [128.93.8.158]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id i9PDLLst000466 for ; Mon, 25 Oct 2004 15:21:22 +0200 Mime-Version: 1.0 (Apple Message framework v619) In-Reply-To: References: Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Damien Doligez Subject: Re: [Caml-list] Single-case union types as strong typedefs Date: Mon, 25 Oct 2004 15:21:28 +0200 To: caml users X-Mailer: Apple Mail (2.619) X-Miltered: at nez-perce with ID 417CFDD1.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; damien:01 damien:01 caml-list:01 typedefs:01 foo:01 foo:01 expr:01 expr:01 constr:01 constr:01 rec:01 doligez:01 doligez:01 checking:01 match:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Oct 23, 2004, at 03:49, Nathaniel Gray wrote: > type x = Foo y > --> type x = y (* Only necessary if types are retained after > type checking *) > Foo x > --> x > match x with Foo y -> expr > --> let y = x in expr Once again, consider this: type foo = Constr of foo;; let rec x = Constr x;; If you eliminate the constructor, there's nothing left! -- Damien ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners