Suppose I have the following signature:
module type Algorithm
sig
...
end
and the following functor:
module Framework =
functor (Alg : Algorithm) ->
struct
let f x = ...
...
end
If I try to use function f from the Framework functor, as shown below,
obviously I get an error because the functor needs to be applied to
module that adheres to Algorithm before the function f is defined.
Is there some way to overcome this problem?
module FooAlgorithm : Algorithm =
struct
...
Framework.f ... ------------> error
end
module BenchmarkFoo = Framework(FooAlgorithm)
.