sig
  module type S =
    sig
      type 'a t
      val to_stream : 'a t -> 'Stream.t
      val of_stream : 'Stream.t -> 'a t
    end
  module type S2 =
    sig
      type ('a, 'b) t
      val to_stream : ('a, 'b) t -> ('a * 'b) Stream.t
      val of_stream : ('a * 'b) Stream.t -> ('a, 'b) t
    end
end