Modules and generic type signature

Hi @octachron,

Thank you very much for the detailed explanation.

I ended up with the following module type signature:

module type CONFIG = sig
  type elt
  type 'a t

  val tCol : 'a t -> 'a

  val fCol : 'a t -> 'a list

  val makeCol : elt -> elt list -> elt t
end

And the functor as the following:

module MakeConfig (C : Comparator.S)
  : CONFIG with type elt := C.t = ...

My goal was to provide the client with a function which, when supplied with a comparator module will produce the CONFIG module. The final function looks like the following:

val prepareConfig :
  (module Core.Comparator.S with type t = 'a) ->
  (module CONFIG with type elt = 'a) = <fun>

let prepareConfig
    (type a)
    (module C : Comparator.S with type t = a) =
  (module struct
    type elt = a
    include MakeConfig (C)
  end : CONFIG with type elt = a)

Thanks for the help.