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
module aggregation
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Wolfgang Lux <lux@h...>
Subject: Re: module aggregation

Franck Delaplace <> writes:
> I want to aggregate two modules in one in order
> to improve some standard modules or some module
> define by functors . How can I do this in Ocaml ? 

This answer is very simple: You cannot.

The only way to achieve your goal would be to define a new module,
copy all values of the module M1 you want to preserve and then add or
change those values which you do not want to include from M1 or add to

> I have also the same problem for module defined by Functor
> I want to add some specific functions once the module is defined.

There's no way to do that. You have to recompile the functor. (After
all we are not in Smalltalk here.)


Wolfgang Lux
WZH Heidelberg, IBM Germany             Internet:
+49-6221-59-4546                        VNET:     LUX at HEIDELBG
+49-6221-59-3500 (fax)	                EARN:     LUX at DHDIBMIP