Re: [Caml-list] Polymorphic values in local modules

2010-02-03 Thread Alain Frisch
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

Re: [Caml-list] Polymorphic values in local modules

2010-02-03 Thread Tiphaine Turpin
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 =

[Caml-list] Polymorphic values in local modules

2010-02-03 Thread Hans Ole Rafaelsen
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