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 LAA29502; Tue, 4 Feb 2003 11:33:40 +0100 (MET) 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 LAA29973 for ; Tue, 4 Feb 2003 11:33:39 +0100 (MET) Received: from ns.mccme.ru ([195.133.68.22]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h14AXXP22117 for ; Tue, 4 Feb 2003 11:33:35 +0100 (MET) Received: from mccme.ru (potanin@mccme.ru [195.178.198.7]) by ns.mccme.ru (8.8.5/8.8.5) with SMTP id NAA26813 for ; Tue, 4 Feb 2003 13:15:57 +0300 Date: Tue, 4 Feb 2003 13:49:49 +0300 (MSK) From: Mike Potanin To: caml-list@inria.fr Subject: Re: [Caml-list] Generic generic types. In-Reply-To: <20030204104941.A29233@pauillac.inria.fr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Tue, 4 Feb 2003, Xavier Leroy wrote: > > Do OCaml support similar type? > > Not in the core language, but you can achieve similar effect with functors: > > module M(A: sig type 'a agregat end) = > struct > type refal_atom = > Char of char > | Int of int > | Term of refal_atom A.agregat > end > > Hope this answers your question, Thank you! It's what I wanted. > > - Xavier Leroy ------------------- 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