From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA14837 for caml-redistribution; Mon, 24 Aug 1998 15:07:38 +0200 (MET DST) 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 IAA19133 for ; Thu, 20 Aug 1998 08:13:42 +0200 (MET DST) Received: from arthur.u-strasbg.fr (arthur.u-strasbg.fr [130.79.75.24]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id IAA06535 for ; Thu, 20 Aug 1998 08:13:40 +0200 (MET DST) From: boos@arthur.u-strasbg.fr Received: (from boos@localhost) by arthur.u-strasbg.fr (8.8.7/8.8.7) id IAA00985; Thu, 20 Aug 1998 08:17:20 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Date: Thu, 20 Aug 1998 08:17:20 +0200 (CEST) To: caml-list@inria.fr CC: luther@dpt-info.u-strasbg.fr, LUTHERSV@e-i.com Subject: Re: Types construits et interface de modules In-Reply-To: <35DA8DDB.4BBB1E59@e-i.com> References: <35DA8DDB.4BBB1E59@e-i.com> X-Mailer: VM 6.43 under 20.4 "Emerald" XEmacs Lucid Message-ID: <13787.48117.777687.277334@arthur.u-strasbg.fr> Sender: weis Salut Sven, Ton truc ne marche évidemment pas en O'Caml, les constructeurs ne son= t pas du tout des valeurs fonctionnelles (comme ils le sont en SML). Par contre, une fonctionnalité assez proche de ce que tu recherches existe dans O'Labl : les variants polymorphes. Ca fait longtemps que je n'ai plus touché à O'Labl, donc je te dis ca de tête : module type T = sig =09type t = [ `A | `B ] =09end module A = struct =09type t = [ `A | `B ] =09end module B = struct =09type t = [ `A | `B | `C ] =09end module F (M:T) = struct =09type t = M.t =09end module MA = F (A) module MB = F (B) [English: what Sven asked for in his mail is probably Jacques Garrigue 's "Polymorphic Variants" (in O'Labl) ] -- Christian (qui découvre avec bonheur O'Caml-2 : félicitations tout le monde != )