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 WAA28952; Thu, 21 Nov 2002 22:13:17 +0100 (MET) 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 WAA28944 for ; Thu, 21 Nov 2002 22:13:16 +0100 (MET) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from AlphaSystem.dnsalias.net (AFontenayssB-109-1-3-225.abo.wanadoo.fr [80.15.96.225]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id gALLDFX15191 for ; Thu, 21 Nov 2002 22:13:16 +0100 (MET) Received: from localhost ([127.0.0.1] helo=AlphaSystem.dnsalias.net) by AlphaSystem.dnsalias.net with esmtp (Exim 4.10) id 18EydP-0004Jc-00 for caml-list@inria.fr; Thu, 21 Nov 2002 22:13:15 +0100 Content-Type: text/plain; charset="us-ascii" From: Johan =?iso-8859-1?q?Balti=E9?= To: caml-list@inria.fr Subject: [Caml-list] Haskell class type simulation Date: Thu, 21 Nov 2002 22:13:14 +0100 User-Agent: KMail/1.4.3 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200211212213.14407.johan.baltie@wanadoo.fr> Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi ! I'm currently looking for a way to simulate the Haskell "class type" not= ion=20 in OCaml i.e. the same kind of : class Eq a where (=3D=3D), (/=3D) :: a -> a -> Bool class (Eq a) =3D> Ord a where compare :: a -> a -> Ordering (<), (<=3D), (>=3D), (>) :: a -> a -> Bool max, min :: a -> a -> a For me it's a bit like module signature with an abstract type and an=20 "extending" semantic and a type constraint. Any hint ? --=20 Ciao Jo ------------------- 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