Re: [Caml-list] First-class module and higher-order types

2011-08-20 Thread Andreas Rossberg
On Aug 20, 2011, at 05.26 h, Jacques Garrigue wrote: On 2011/08/20, at 0:38, Arnaud Spiwack wrote: • On the theoretical side, how hard is it to design a variant of Hindley-Milner's typing algorithm with type-family quantification? (I understand that Ocaml's typing machinery is pretty hard

[Caml-list] First-class module and higher-order types

2011-08-19 Thread Arnaud Spiwack
Dear all, One way to use first-class module is to extend a functor without resorting to a new functor. Like, for instance: type ('a,'t) set = (module Set.S with type elt = 'a and type t = 't) let add2 (type a) (type t) (m:(a,t) set) x y s = let module S = (val m:Set.S with type elt = a and