Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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 Archives:
Bug reports: FAQ:
Beginner's list: