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 C5F5FBC3F for ; Mon, 25 Oct 2004 16:25:05 +0200 (CEST) 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 i9PEP5Q6023036 for ; Mon, 25 Oct 2004 16:25:05 +0200 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA22240 for ; Mon, 25 Oct 2004 16:25:04 +0200 (MET DST) Received: from cgpsrv2.cis.mcmaster.ca (univmail.CIS.McMaster.CA [130.113.64.46]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id i9PEP3o8023027; Mon, 25 Oct 2004 16:25:04 +0200 Received: from [130.113.68.27] (account carette@univmail.cis.mcmaster.ca HELO pccarettej) by cgpsrv2.cis.mcmaster.ca (CommuniGate Pro SMTP 4.1.8) with ESMTP id 69999309; Mon, 25 Oct 2004 10:25:02 -0400 Reply-To: From: "Jacques Carette" To: "'Damien Doligez'" , "'caml users'" Subject: RE: [Caml-list] Single-case union types as strong typedefs Date: Mon, 25 Oct 2004 10:25:11 -0400 Organization: McMaster University Message-ID: <000601c4ba9e$6f9b8a00$1b447182@cas.mcmaster.ca> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 In-Reply-To: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Miltered: at concorde with ID 417D0CC1.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 417D0CBF.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 typedefs:01 foo:01 constr:01 foo:01 rec:01 constr:01 damien:01 statically:01 statically:01 run-time:01 compiler:01 partial:01 constructor:01 computation:01 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=none autolearn=disabled version=3.0.0 X-Spam-Level: > Once again, consider this: >=20 > type foo =3D Constr of foo;; > let rec x =3D Constr x;; >=20 > If you eliminate the constructor, there's nothing left! >=20 > -- Damien Isn't that correct though? The value x is completely known statically, = and all computation on x can be done statically, so it is not necessary to = have any traces of x left at run-time. Yes, I am assuming that a fair bit of partial evaluation is a good thing = for the compiler to do. Jacques