functor (M : Map.S->
  functor (G : sig type g = M.key val g : g t end->
    sig val gen : int Generator.t -> 'Generator.t -> 'M.t Generator.t end