package hg_lib

  1. Overview
  2. Docs

To satisfy this functor, define a signature S for your hg library with respect to the abstract type constructors 'a with_args and 'a output. Then generate the interface for your library as follows:

module Make_s (A : Hg_lib_factory.Arg) = struct
  module type S = S
    with type 'a with_args := 'a A.With_args.t
    with type 'a output    := 'a A.Output.t
end
module type Hg = Hg_lib_factory.Make_lib(Make_s).S

This is necessary because a module type passed to a functor must either be fully abstract or fully concrete -- you can't say the functor input has a module type S which has types 'a with_args and 'a output unless you fully specify S. We want S to be different for different callers, so we have to do this workaround.

Parameters

module M : sig ... end

Signature

module type S = sig ... end