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 OAA08904; Tue, 28 Sep 2004 14:01:38 +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 OAA10654 for ; Tue, 28 Sep 2004 14:01:37 +0200 (MET DST) Received: from annexia.force9.co.uk (annexia.force9.co.uk [212.56.101.183]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id i8SC1b90025783 for ; Tue, 28 Sep 2004 14:01:37 +0200 Received: from rich by annexia.force9.co.uk with local (Exim 3.36 #1 (Debian)) id 1CCGfo-0008Sa-00 for ; Tue, 28 Sep 2004 13:01:36 +0100 Date: Tue, 28 Sep 2004 13:01:36 +0100 Cc: caml-list@inria.fr Subject: Re: [Caml-list] Caml monomorphisation (was Observations on OCaml vs. Haskell) Message-ID: <20040928120136.GA32492@annexia.org> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="envbJBWh7q8WU6mo" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.5.1+cvs20040105i From: Richard Jones X-Miltered: at nez-perce with ID 415952A1.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 observations:01 haskell:01 2004:99 pons:01 shortcoming:01 3.06,:01 footprints:01 giants:99 ltd:98 compiler:01 compiler:01 fernandez:01 ints:01 ocaml:01 X-Attachments: type="application/pgp-signature" name="signature.asc" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk --envbJBWh7q8WU6mo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 28, 2004 at 12:10:39PM +0200, Diego Olivier Fernandez Pons wrot= e: > > [Richard Jones] shows that: > > > > ;;; > > let max a b =3D > > if a > b then a else b > > in > > print_int (max 2 3) > > ;;; > > > > > > uses the polymorphic version of '>', even though the use of max here us= es > > only ints. >=20 > Why doesn't Caml compiler specialize the type of [max] ? It seems to just be a shortcoming of the compiler. Note that this was observed with 3.06, which is rather ancient version of OCaml. It may well work in 3.08.1. Rich. --=20 Richard Jones. http://www.annexia.org/ http://www.j-london.com/ Merjis Ltd. http://www.merjis.com/ - improving website return on investment If I have not seen as far as others, it is because I have been standing in the footprints of giants. -- from Usenet --envbJBWh7q8WU6mo Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQFBWVKg4le1M6q9pzoRAlj9AJ9w/5HLAh8FsR5gUKiKJUa245b3MQCghpN2 4iKjKQOMzDX24qpVef2cdNU= =O78k -----END PGP SIGNATURE----- --envbJBWh7q8WU6mo-- ------------------- 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