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 CAA05532; Fri, 19 Apr 2002 02:22:15 +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 CAA05588 for ; Fri, 19 Apr 2002 02:22:14 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from mel-rto2.wanadoo.fr (smtp-out-2.wanadoo.fr [193.252.19.254]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g3J0MDL15886 for ; Fri, 19 Apr 2002 02:22:13 +0200 (MET DST) Received: from mel-rta2.wanadoo.fr (193.252.19.152) by mel-rto2.wanadoo.fr; 19 Apr 2002 02:22:13 +0200 Received: from debian (80.8.82.94) by mel-rta2.wanadoo.fr; 19 Apr 2002 02:21:19 +0200 Received: from moi by debian with local (Exim 3.35 #1 (Debian)) id 16yM9Z-0007I8-00 for ; Fri, 19 Apr 2002 02:21:29 +0200 To: caml-list@inria.fr Subject: Re: [Caml-list] Is a Cow an Animal? References: <538FE5B6-52FE-11D6-9686-000502DB38F5@wetware.com> From: Remi VANICAT Date: 19 Apr 2002 02:21:29 +0200 In-Reply-To: <538FE5B6-52FE-11D6-9686-000502DB38F5@wetware.com> Message-ID: <87y9fkilme.dlv@wanadoo.fr> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk james woodyatt writes: > I borrowed a technique I learned here from Brian Rogoff that uses an > abstract type with a contravariant type parameter for passing the type > of energy a food object contains to an animal object that can eat it. > (I wish I were smart enough to know the name for this technique.) > the use of an abstract type with a covariant or contravariant type (or even not variant) parameter, and where the actual implementation of the type doesn't use this parameter (as in type 'a eater = int) is often call phantom type. one can read the very interesting mail about this in the archive of this mailing list http://caml.inria.fr/archives/200109/msg00097.html -- Rémi Vanicat vanicat@labri.u-bordeaux.fr http://dept-info.labri.u-bordeaux.fr/~vanicat ------------------- 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