2011/4/11 Julien Signoles > Hello Allain, > > 2011/4/8 Alain Frisch > >> On 04/08/2011 01:25 PM, Julien Signoles wrote: >> >>> 2) module F(X:...) = G(H(X)) >>> >>> Without applicative functors, we again get the error about parameter >>> elimination. But I see no workaround to eliminate it without changing >>> the signature of F. So IMHO that is a use case where applicative >>> functors are useful. >>> >> >> I'd be interested to see a full example for this case. >> > > Download sources of Frama-C here : > http://frama-c.com/download/frama-c-Carbon-20110201.tar.gz > The use case is in module State_builder : > > src/project/state_builder.ml: > (* ... *) > module Caml_weak_hashtbl(Data: Datatype.S) = > Weak_hashtbl(Weak.Make(Data))(Data) > (* ... *) > > Do you see any workaround to compile this code with -no-app-funct (and as > most as possible without changing API)? > Looking this case in details, there is actually one workaround. src/project/state_builder.ml: (* ... *) module Caml_weak_hashtbl(Data: Datatype.S)(Info: Info_with_size) = struct module W = Weak.Make(Data) include Weak_hashtbl(W)(Data)(Info) end (* ... *) There is still the issue with diamond import in libraries like mentionned by Andreas. Sorry for the noise, Julien