Le ven 08 déc 2006 17:03:14 CET,
"drehman27" < drehman27%40yahoo.com">drehman27
yahoo.com> a écrit :
> It still doesn't work. Could you please fix my example so that it
> compiles? Thanks
Sure, here it is:
module type Algorithm =
sig
val run_algorithm : unit -> unit
end
module type FrameworkType =
sig
val print_benchmark_results : unit -> unit
end
module Framework =
functor (Alg : Algorithm) ->
(struct
let print_benchmark_results () = print_endline "Excelent!"
end: FrameworkType)
module rec FooAlgorithm : Algorithm =
struct
let run_algorithm () = ()
let results () = BenchmarkFoo.print_benchmark_results ()
end
and BenchmarkFoo : FrameworkType = Framework(FooAlgorithm)
--
E tutto per oggi, a la prossima volta.
Virgile
.