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 JAA07665; Wed, 14 Aug 2002 09:10:26 +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 JAA07890 for ; Wed, 14 Aug 2002 09:10:25 +0200 (MET DST) 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 g7E7AO124395 for ; Wed, 14 Aug 2002 09:10:24 +0200 (MET DST) Received: from mel-rta7.wanadoo.fr (193.252.19.61) by mel-rto2.wanadoo.fr (6.5.007) id 3D5392B6001BDD1F for caml-list@inria.fr; Wed, 14 Aug 2002 09:10:24 +0200 Received: from AlphaSystem.dnsalias.net (80.11.74.121) by mel-rta7.wanadoo.fr (6.5.007) id 3D49FF1400441E93 for caml-list@inria.fr; Wed, 14 Aug 2002 09:10:24 +0200 Received: from localhost ([127.0.0.1] helo=alphasystem.dnsalias.net) by AlphaSystem.dnsalias.net with esmtp (Exim 3.36 #1 (Debian)) id 17esIR-0006tG-00 for ; Wed, 14 Aug 2002 09:10:23 +0200 From: "Johan Baltié" To: caml-list@inria.fr Subject: Re: [Caml-list] Module/Functor modelisation Date: Wed, 14 Aug 2002 08:10:23 +0100 Message-Id: <20020814071023.M65396@wanadoo.fr> In-Reply-To: <20020814065526.M40144@wanadoo.fr> References: <20020814065526.M40144@wanadoo.fr> X-Mailer: Open WebMail 1.61 20020204 X-OriginatingIP: 192.6.2.192 (baltie_j) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Sorry for this one, my webmail is sometimes a bit anoying > Hi ! > > I have a simple functor: > > module type Used = > sig > type output > > val toto : int -> output -> output > val tutu : double -> output -> output > end > > module type User = > functor (U : Used) -> > sig > > val toto : int -> U.output -> U.output > val tutu : double -> U.output -> U.output > end > > And User is implemented by two types doing mostly the same things with > different init, and with recursive and/or mutual call in toto an tutu. > > I'd like to factorize the shared code, BUT the recursive call prevent > me of doing this. Here an implementation example of the part where the > problem lie: > > module User1: User = > functor (U : Used) -> > struct > let toto i output = > > end > > 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 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