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 IAA27771; Thu, 2 May 2002 08:52:52 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 IAA27765 for ; Thu, 2 May 2002 08:52:51 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g426qpD04847 for ; Thu, 2 May 2002 08:52:51 +0200 (MET DST) Received: (from fpottier@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id IAA27761 for caml-list@inria.fr; Thu, 2 May 2002 08:52:51 +0200 (MET DST) Date: Thu, 2 May 2002 08:52:51 +0200 From: Francois Pottier To: caml-list@inria.fr Subject: Re: [Caml-list] Modules and typing Message-ID: <20020502085251.A27687@pauillac.inria.fr> Reply-To: Francois.Pottier@inria.fr References: <3CCF27C7.7080509@ozemail.com.au> <20020501080857.35329.qmail@web11201.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Mutt 1.0i In-Reply-To: <20020501080857.35329.qmail@web11201.mail.yahoo.com>; from noelwelsh@yahoo.com on Wed, May 01, 2002 at 01:08:57AM -0700 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello, Noel Welsh wrote: > > adopt specialized representations only, > > duplicating polymorphic functions > > if they have to be used at several types whose > > representations differ > > I believe MLTon does this, at the cost of no separate > compilation. MLton does a bit more than that, really. It specializes *all* polymorphic code, so that, after the transformation, the program can be typed in a monomorphic type discipline. My suggestion, on the other hand, was to duplicate polymorphic code only on a ``per-kind'' basis; for instance, if all product types are of kind POINTER and (unboxed) integers are of kind INT, then a polymorphic function (say, the identity) that is used at types (say) int * int, float * float and int would only be compiled twice. I believe this would severely limit the ``code size explosion'' problem that is sometimes feared when doing monomorphization. -- François Pottier Francois.Pottier@inria.fr http://pauillac.inria.fr/~fpottier/ ------------------- 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