sig
  type 'a t = 'Tail.t
  val create : unit -> 'a t
  val extend : 'a t -> '-> unit
  val close_exn : 'a t -> unit
  val close_if_open : 'a t -> unit
  val is_closed : 'a t -> bool
  val of_raw : ('a, Execution_context.t) Raw_tail.t -> 'a t
  val to_raw : 'a t -> ('a, Execution_context.t) Raw_tail.t
  module Stream :
    sig
      type 'a t = 'Tail.Stream.t
      type ('a, 'execution_context) next_ =
        ('a, 'execution_context) Raw_stream.next =
          Nil
        | Cons of 'a * ('a, 'execution_context) Raw_stream.t
      type 'a next = ('a, Execution_context.t) next_
      val next : 'a t -> 'a next Deferred.t
      val of_raw : ('a, Execution_context.t) Raw_stream.t -> 'a t
      val to_raw : 'a t -> ('a, Execution_context.t) Raw_stream.t
      val sexp_of_t : ('-> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
    end
  val collect : 'a t -> 'Stream.t
  val sexp_of_t : ('-> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end