sig
  type status = Ok | NotOk
  type directive = Todo of string
  type diagnostic = Diag of string list
  type node =
      TestCaseNode of TAPDocument.status * int * string *
        TAPDocument.diagnostic option
    | TodoTestCaseNode of TAPDocument.status * int * string *
        TAPDocument.directive * TAPDocument.diagnostic option
    | DiagnosticNode of TAPDocument.diagnostic
    | PlanNode of int
  type t = Document of TAPDocument.node list
  val count_test_nodes : TAPDocument.node list -> int -> int
  val count_tests : TAPDocument.t -> int
  val count_test_failures : TAPDocument.t -> int
  val create_failure_footer : int -> int -> TAPDocument.node
  val create_count_footer : int -> int -> TAPDocument.node
  val init_document : TAPDocument.t -> TAPDocument.t
  val string_of_status : TAPDocument.status -> string
  val string_of_diagnostic : TAPDocument.diagnostic -> string
  val string_of_directive : TAPDocument.directive -> string
  val string_of_node : TAPDocument.node -> string
  val string_of_document : TAPDocument.t -> string
end