English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] Module/Functor modelisation
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-08-14 (06:55)
From: Johan Baltié <johan.baltie@w...>
Subject: [Caml-list] Module/Functor modelisation
Hi !

I have a simple functor:

module type Used =
 type output

 val toto : int -> output -> output
 val tutu : double -> output -> output

module type User =
 functor (U : Used) ->

 val toto : int -> U.output -> U.output
 val tutu : double -> U.output -> U.output

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) ->
   let toto i output = 



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