On 03/02/2010 11:05, Tiphaine Turpin wrote:
It is possible however, provided you wrap the argument inside a
polymorphic record field (or object) as follows:
type t = {f : 'a. 'a -> 'a}
let test f =
let module Foo : Foo_sig =
struct
let foo = f.f
end
in
()
Another opti
Hans Ole Rafaelsen a écrit :
> Hi,
>
> I'm trying to construct a module that have a function taking
> polymorphic arguments. I want to use this module as a local module in
> different places, where the function implementation is different. The
> module has the signature:
>
> module type Foo_sig =
Hi,
I'm trying to construct a module that have a function taking polymorphic
arguments. I want to use this module as a local module in different
places, where the function implementation is different. The module has
the signature:
module type Foo_sig =
sig
val foo : 'a -> 'a
end
If I have