sig
  val __pa_ounit_275876e34cf609db118f3d84b799a790 : string
  module Monitor :
    sig
      val __pa_ounit_275876e34cf609db118f3d84b799a790 : string
      val debug : bool
      type t =
        Raw_monitor.t = {
        name : Core.Std.Info.t;
        here : Core.Std.Source_code_position.t option;
        id : int;
        parent : t option;
        mutable error_handlers : (exn -> unit) list;
        mutable has_seen_error : bool;
        mutable someone_is_listening : bool;
        mutable kill_index : Kill_index.t;
      }
      val kill_index : t -> Kill_index.t
      val set_kill_index : t -> Kill_index.t -> unit
      val someone_is_listening : t -> bool
      val set_someone_is_listening : t -> bool -> unit
      val has_seen_error : t -> bool
      val set_has_seen_error : t -> bool -> unit
      val error_handlers : t -> (exn -> unit) list
      val set_error_handlers : t -> (exn -> unit) list -> unit
      val parent : t -> t option
      val id : t -> int
      val here : t -> Core.Std.Source_code_position.t option
      val name : t -> Core.Std.Info.t
      module Fields :
        sig
          val names : string list
          val kill_index :
            ([< `Read | `Set_and_create ], t, Kill_index.t)
            Fieldslib.Field.t_with_perm
          val someone_is_listening :
            ([< `Read | `Set_and_create ], t, bool)
            Fieldslib.Field.t_with_perm
          val has_seen_error :
            ([< `Read | `Set_and_create ], t, bool)
            Fieldslib.Field.t_with_perm
          val error_handlers :
            ([< `Read | `Set_and_create ], t, (exn -> unit) list)
            Fieldslib.Field.t_with_perm
          val parent :
            ([< `Read | `Set_and_create ], t, t option)
            Fieldslib.Field.t_with_perm
          val id :
            ([< `Read | `Set_and_create ], t, int)
            Fieldslib.Field.t_with_perm
          val here :
            ([< `Read | `Set_and_create ], t,
             Core.Std.Source_code_position.t option)
            Fieldslib.Field.t_with_perm
          val name :
            ([< `Read | `Set_and_create ], t, Core.Std.Info.t)
            Fieldslib.Field.t_with_perm
          val make_creator :
            name:(([< `Read | `Set_and_create ], t, Core.Std.Info.t)
                  Fieldslib.Field.t_with_perm ->
                  '-> ('-> Core.Std.Info.t) * 'c) ->
            here:(([< `Read | `Set_and_create ], t,
                   Core.Std.Source_code_position.t option)
                  Fieldslib.Field.t_with_perm ->
                  '-> ('-> Core.Std.Source_code_position.t option) * 'd) ->
            id:(([< `Read | `Set_and_create ], t, int)
                Fieldslib.Field.t_with_perm -> '-> ('-> int) * 'e) ->
            parent:(([< `Read | `Set_and_create ], t, t option)
                    Fieldslib.Field.t_with_perm ->
                    '-> ('-> t option) * 'f) ->
            error_handlers:(([< `Read | `Set_and_create ], t,
                             (exn -> unit) list)
                            Fieldslib.Field.t_with_perm ->
                            '-> ('-> (exn -> unit) list) * 'g) ->
            has_seen_error:(([< `Read | `Set_and_create ], t, bool)
                            Fieldslib.Field.t_with_perm ->
                            '-> ('-> bool) * 'h) ->
            someone_is_listening:(([< `Read | `Set_and_create ], t, bool)
                                  Fieldslib.Field.t_with_perm ->
                                  '-> ('-> bool) * 'i) ->
            kill_index:(([< `Read | `Set_and_create ], t, Kill_index.t)
                        Fieldslib.Field.t_with_perm ->
                        '-> ('-> Kill_index.t) * 'j) ->
            '-> ('-> t) * 'j
          val create :
            name:Core.Std.Info.t ->
            here:Core.Std.Source_code_position.t option ->
            id:int ->
            parent:t option ->
            error_handlers:(exn -> unit) list ->
            has_seen_error:bool ->
            someone_is_listening:bool -> kill_index:Kill_index.t -> t
          val map :
            name:(([< `Read | `Set_and_create ], t, Core.Std.Info.t)
                  Fieldslib.Field.t_with_perm -> Core.Std.Info.t) ->
            here:(([< `Read | `Set_and_create ], t,
                   Core.Std.Source_code_position.t option)
                  Fieldslib.Field.t_with_perm ->
                  Core.Std.Source_code_position.t option) ->
            id:(([< `Read | `Set_and_create ], t, int)
                Fieldslib.Field.t_with_perm -> int) ->
            parent:(([< `Read | `Set_and_create ], t, t option)
                    Fieldslib.Field.t_with_perm -> t option) ->
            error_handlers:(([< `Read | `Set_and_create ], t,
                             (exn -> unit) list)
                            Fieldslib.Field.t_with_perm -> (exn -> unit) list) ->
            has_seen_error:(([< `Read | `Set_and_create ], t, bool)
                            Fieldslib.Field.t_with_perm -> bool) ->
            someone_is_listening:(([< `Read | `Set_and_create ], t, bool)
                                  Fieldslib.Field.t_with_perm -> bool) ->
            kill_index:(([< `Read | `Set_and_create ], t, Kill_index.t)
                        Fieldslib.Field.t_with_perm -> Kill_index.t) ->
            t
          val iter :
            name:(([< `Read | `Set_and_create ], t, Core.Std.Info.t)
                  Fieldslib.Field.t_with_perm -> 'a) ->
            here:(([< `Read | `Set_and_create ], t,
                   Core.Std.Source_code_position.t option)
                  Fieldslib.Field.t_with_perm -> 'b) ->
            id:(([< `Read | `Set_and_create ], t, int)
                Fieldslib.Field.t_with_perm -> 'c) ->
            parent:(([< `Read | `Set_and_create ], t, t option)
                    Fieldslib.Field.t_with_perm -> 'd) ->
            error_handlers:(([< `Read | `Set_and_create ], t,
                             (exn -> unit) list)
                            Fieldslib.Field.t_with_perm -> 'e) ->
            has_seen_error:(([< `Read | `Set_and_create ], t, bool)
                            Fieldslib.Field.t_with_perm -> 'f) ->
            someone_is_listening:(([< `Read | `Set_and_create ], t, bool)
                                  Fieldslib.Field.t_with_perm -> 'g) ->
            kill_index:(([< `Read | `Set_and_create ], t, Kill_index.t)
                        Fieldslib.Field.t_with_perm -> 'h) ->
            'h
          val fold :
            init:'->
            name:('->
                  ([< `Read | `Set_and_create ], t, Core.Std.Info.t)
                  Fieldslib.Field.t_with_perm -> 'b) ->
            here:('->
                  ([< `Read | `Set_and_create ], t,
                   Core.Std.Source_code_position.t option)
                  Fieldslib.Field.t_with_perm -> 'c) ->
            id:('->
                ([< `Read | `Set_and_create ], t, int)
                Fieldslib.Field.t_with_perm -> 'd) ->
            parent:('->
                    ([< `Read | `Set_and_create ], t, t option)
                    Fieldslib.Field.t_with_perm -> 'e) ->
            error_handlers:('->
                            ([< `Read | `Set_and_create ], t,
                             (exn -> unit) list)
                            Fieldslib.Field.t_with_perm -> 'f) ->
            has_seen_error:('->
                            ([< `Read | `Set_and_create ], t, bool)
                            Fieldslib.Field.t_with_perm -> 'g) ->
            someone_is_listening:('->
                                  ([< `Read | `Set_and_create ], t, bool)
                                  Fieldslib.Field.t_with_perm -> 'h) ->
            kill_index:('->
                        ([< `Read | `Set_and_create ], t, Kill_index.t)
                        Fieldslib.Field.t_with_perm -> 'i) ->
            'i
          val map_poly :
            ([< `Read | `Set_and_create ], t, 'a) Fieldslib.Field.user ->
            'a list
          val for_all :
            name:(([< `Read | `Set_and_create ], t, Core.Std.Info.t)
                  Fieldslib.Field.t_with_perm -> bool) ->
            here:(([< `Read | `Set_and_create ], t,
                   Core.Std.Source_code_position.t option)
                  Fieldslib.Field.t_with_perm -> bool) ->
            id:(([< `Read | `Set_and_create ], t, int)
                Fieldslib.Field.t_with_perm -> bool) ->
            parent:(([< `Read | `Set_and_create ], t, t option)
                    Fieldslib.Field.t_with_perm -> bool) ->
            error_handlers:(([< `Read | `Set_and_create ], t,
                             (exn -> unit) list)
                            Fieldslib.Field.t_with_perm -> bool) ->
            has_seen_error:(([< `Read | `Set_and_create ], t, bool)
                            Fieldslib.Field.t_with_perm -> bool) ->
            someone_is_listening:(([< `Read | `Set_and_create ], t, bool)
                                  Fieldslib.Field.t_with_perm -> bool) ->
            kill_index:(([< `Read | `Set_and_create ], t, Kill_index.t)
                        Fieldslib.Field.t_with_perm -> bool) ->
            bool
          val exists :
            name:(([< `Read | `Set_and_create ], t, Core.Std.Info.t)
                  Fieldslib.Field.t_with_perm -> bool) ->
            here:(([< `Read | `Set_and_create ], t,
                   Core.Std.Source_code_position.t option)
                  Fieldslib.Field.t_with_perm -> bool) ->
            id:(([< `Read | `Set_and_create ], t, int)
                Fieldslib.Field.t_with_perm -> bool) ->
            parent:(([< `Read | `Set_and_create ], t, t option)
                    Fieldslib.Field.t_with_perm -> bool) ->
            error_handlers:(([< `Read | `Set_and_create ], t,
                             (exn -> unit) list)
                            Fieldslib.Field.t_with_perm -> bool) ->
            has_seen_error:(([< `Read | `Set_and_create ], t, bool)
                            Fieldslib.Field.t_with_perm -> bool) ->
            someone_is_listening:(([< `Read | `Set_and_create ], t, bool)
                                  Fieldslib.Field.t_with_perm -> bool) ->
            kill_index:(([< `Read | `Set_and_create ], t, Kill_index.t)
                        Fieldslib.Field.t_with_perm -> bool) ->
            bool
          val to_list :
            name:(([< `Read | `Set_and_create ], t, Core.Std.Info.t)
                  Fieldslib.Field.t_with_perm -> 'a) ->
            here:(([< `Read | `Set_and_create ], t,
                   Core.Std.Source_code_position.t option)
                  Fieldslib.Field.t_with_perm -> 'a) ->
            id:(([< `Read | `Set_and_create ], t, int)
                Fieldslib.Field.t_with_perm -> 'a) ->
            parent:(([< `Read | `Set_and_create ], t, t option)
                    Fieldslib.Field.t_with_perm -> 'a) ->
            error_handlers:(([< `Read | `Set_and_create ], t,
                             (exn -> unit) list)
                            Fieldslib.Field.t_with_perm -> 'a) ->
            has_seen_error:(([< `Read | `Set_and_create ], t, bool)
                            Fieldslib.Field.t_with_perm -> 'a) ->
            someone_is_listening:(([< `Read | `Set_and_create ], t, bool)
                                  Fieldslib.Field.t_with_perm -> 'a) ->
            kill_index:(([< `Read | `Set_and_create ], t, Kill_index.t)
                        Fieldslib.Field.t_with_perm -> 'a) ->
            'a list
          module Direct :
            sig
              val iter :
                t ->
                name:(([< `Read | `Set_and_create ], t, Core.Std.Info.t)
                      Fieldslib.Field.t_with_perm ->
                      t -> Core.Std.Info.t -> 'a) ->
                here:(([< `Read | `Set_and_create ], t,
                       Core.Std.Source_code_position.t option)
                      Fieldslib.Field.t_with_perm ->
                      t -> Core.Std.Source_code_position.t option -> 'b) ->
                id:(([< `Read | `Set_and_create ], t, int)
                    Fieldslib.Field.t_with_perm -> t -> int -> 'c) ->
                parent:(([< `Read | `Set_and_create ], t, t option)
                        Fieldslib.Field.t_with_perm -> t -> t option -> 'd) ->
                error_handlers:(([< `Read | `Set_and_create ], t,
                                 (exn -> unit) list)
                                Fieldslib.Field.t_with_perm ->
                                t -> (exn -> unit) list -> 'e) ->
                has_seen_error:(([< `Read | `Set_and_create ], t, bool)
                                Fieldslib.Field.t_with_perm ->
                                t -> bool -> 'f) ->
                someone_is_listening:(([< `Read | `Set_and_create ], t, bool)
                                      Fieldslib.Field.t_with_perm ->
                                      t -> bool -> 'g) ->
                kill_index:(([< `Read | `Set_and_create ], t, Kill_index.t)
                            Fieldslib.Field.t_with_perm ->
                            t -> Kill_index.t -> 'h) ->
                'h
              val fold :
                t ->
                init:'->
                name:('->
                      ([< `Read | `Set_and_create ], t, Core.Std.Info.t)
                      Fieldslib.Field.t_with_perm ->
                      t -> Core.Std.Info.t -> 'b) ->
                here:('->
                      ([< `Read | `Set_and_create ], t,
                       Core.Std.Source_code_position.t option)
                      Fieldslib.Field.t_with_perm ->
                      t -> Core.Std.Source_code_position.t option -> 'c) ->
                id:('->
                    ([< `Read | `Set_and_create ], t, int)
                    Fieldslib.Field.t_with_perm -> t -> int -> 'd) ->
                parent:('->
                        ([< `Read | `Set_and_create ], t, t option)
                        Fieldslib.Field.t_with_perm -> t -> t option -> 'e) ->
                error_handlers:('->
                                ([< `Read | `Set_and_create ], t,
                                 (exn -> unit) list)
                                Fieldslib.Field.t_with_perm ->
                                t -> (exn -> unit) list -> 'f) ->
                has_seen_error:('->
                                ([< `Read | `Set_and_create ], t, bool)
                                Fieldslib.Field.t_with_perm ->
                                t -> bool -> 'g) ->
                someone_is_listening:('->
                                      ([< `Read | `Set_and_create ], t, bool)
                                      Fieldslib.Field.t_with_perm ->
                                      t -> bool -> 'h) ->
                kill_index:('->
                            ([< `Read | `Set_and_create ], t, Kill_index.t)
                            Fieldslib.Field.t_with_perm ->
                            t -> Kill_index.t -> 'i) ->
                'i
            end
        end
      module Pretty :
        sig
          type one =
            Raw_monitor.Pretty.one = {
            name : Core.Std.Info.t;
            here : Core.Std.Source_code_position.t option;
            id : int;
            has_seen_error : bool;
            someone_is_listening : bool;
            kill_index : Kill_index.t;
          }
          val sexp_of_one : one -> Sexplib.Sexp.t
          type t = one list
          val sexp_of_t : one list -> Sexplib.Sexp.t
        end
      val to_pretty : t -> Pretty.one Core.Std.List.t
      val sexp_of_t : t -> Sexplib.Sexp.t
      val next_id : unit -> int
      val create_with_parent :
        ?here:Core.Std.Source_code_position.t ->
        ?info:Core.Std.Info.t -> ?name:string -> t option -> t
      val main : t
      exception Shutdown
      val update_kill_index : t -> global_kill_index:Kill_index.t -> unit
    end
  type t =
    Execution_context.t = {
    monitor : Monitor.t;
    priority : Priority.t;
    backtrace_history : Core.Std.Backtrace.t list;
    mutable kill_index : Kill_index.t;
  }
  val sexp_of_t : t -> Sexplib.Sexp.t
  val kill_index : t -> Kill_index.t
  val set_kill_index : t -> Kill_index.t -> unit
  val backtrace_history : t -> Core.Std.Backtrace.t list
  val priority : t -> Priority.t
  val monitor : t -> Monitor.t
  module Fields :
    sig
      val names : string list
      val kill_index :
        ([< `Read | `Set_and_create ], t, Kill_index.t)
        Fieldslib.Field.t_with_perm
      val backtrace_history :
        ([< `Read | `Set_and_create ], t, Core.Std.Backtrace.t list)
        Fieldslib.Field.t_with_perm
      val priority :
        ([< `Read | `Set_and_create ], t, Priority.t)
        Fieldslib.Field.t_with_perm
      val monitor :
        ([< `Read | `Set_and_create ], t, Monitor.t)
        Fieldslib.Field.t_with_perm
      val make_creator :
        monitor:(([< `Read | `Set_and_create ], t, Monitor.t)
                 Fieldslib.Field.t_with_perm -> '-> ('-> Monitor.t) * 'c) ->
        priority:(([< `Read | `Set_and_create ], t, Priority.t)
                  Fieldslib.Field.t_with_perm ->
                  '-> ('-> Priority.t) * 'd) ->
        backtrace_history:(([< `Read | `Set_and_create ], t,
                            Core.Std.Backtrace.t list)
                           Fieldslib.Field.t_with_perm ->
                           '-> ('-> Core.Std.Backtrace.t list) * 'e) ->
        kill_index:(([< `Read | `Set_and_create ], t, Kill_index.t)
                    Fieldslib.Field.t_with_perm ->
                    '-> ('-> Kill_index.t) * 'f) ->
        '-> ('-> t) * 'f
      val create :
        monitor:Monitor.t ->
        priority:Priority.t ->
        backtrace_history:Core.Std.Backtrace.t list ->
        kill_index:Kill_index.t -> t
      val map :
        monitor:(([< `Read | `Set_and_create ], t, Monitor.t)
                 Fieldslib.Field.t_with_perm -> Monitor.t) ->
        priority:(([< `Read | `Set_and_create ], t, Priority.t)
                  Fieldslib.Field.t_with_perm -> Priority.t) ->
        backtrace_history:(([< `Read | `Set_and_create ], t,
                            Core.Std.Backtrace.t list)
                           Fieldslib.Field.t_with_perm ->
                           Core.Std.Backtrace.t list) ->
        kill_index:(([< `Read | `Set_and_create ], t, Kill_index.t)
                    Fieldslib.Field.t_with_perm -> Kill_index.t) ->
        t
      val iter :
        monitor:(([< `Read | `Set_and_create ], t, Monitor.t)
                 Fieldslib.Field.t_with_perm -> 'a) ->
        priority:(([< `Read | `Set_and_create ], t, Priority.t)
                  Fieldslib.Field.t_with_perm -> 'b) ->
        backtrace_history:(([< `Read | `Set_and_create ], t,
                            Core.Std.Backtrace.t list)
                           Fieldslib.Field.t_with_perm -> 'c) ->
        kill_index:(([< `Read | `Set_and_create ], t, Kill_index.t)
                    Fieldslib.Field.t_with_perm -> 'd) ->
        'd
      val fold :
        init:'->
        monitor:('->
                 ([< `Read | `Set_and_create ], t, Monitor.t)
                 Fieldslib.Field.t_with_perm -> 'b) ->
        priority:('->
                  ([< `Read | `Set_and_create ], t, Priority.t)
                  Fieldslib.Field.t_with_perm -> 'c) ->
        backtrace_history:('->
                           ([< `Read | `Set_and_create ], t,
                            Core.Std.Backtrace.t list)
                           Fieldslib.Field.t_with_perm -> 'd) ->
        kill_index:('->
                    ([< `Read | `Set_and_create ], t, Kill_index.t)
                    Fieldslib.Field.t_with_perm -> 'e) ->
        'e
      val map_poly :
        ([< `Read | `Set_and_create ], t, 'a) Fieldslib.Field.user -> 'a list
      val for_all :
        monitor:(([< `Read | `Set_and_create ], t, Monitor.t)
                 Fieldslib.Field.t_with_perm -> bool) ->
        priority:(([< `Read | `Set_and_create ], t, Priority.t)
                  Fieldslib.Field.t_with_perm -> bool) ->
        backtrace_history:(([< `Read | `Set_and_create ], t,
                            Core.Std.Backtrace.t list)
                           Fieldslib.Field.t_with_perm -> bool) ->
        kill_index:(([< `Read | `Set_and_create ], t, Kill_index.t)
                    Fieldslib.Field.t_with_perm -> bool) ->
        bool
      val exists :
        monitor:(([< `Read | `Set_and_create ], t, Monitor.t)
                 Fieldslib.Field.t_with_perm -> bool) ->
        priority:(([< `Read | `Set_and_create ], t, Priority.t)
                  Fieldslib.Field.t_with_perm -> bool) ->
        backtrace_history:(([< `Read | `Set_and_create ], t,
                            Core.Std.Backtrace.t list)
                           Fieldslib.Field.t_with_perm -> bool) ->
        kill_index:(([< `Read | `Set_and_create ], t, Kill_index.t)
                    Fieldslib.Field.t_with_perm -> bool) ->
        bool
      val to_list :
        monitor:(([< `Read | `Set_and_create ], t, Monitor.t)
                 Fieldslib.Field.t_with_perm -> 'a) ->
        priority:(([< `Read | `Set_and_create ], t, Priority.t)
                  Fieldslib.Field.t_with_perm -> 'a) ->
        backtrace_history:(([< `Read | `Set_and_create ], t,
                            Core.Std.Backtrace.t list)
                           Fieldslib.Field.t_with_perm -> 'a) ->
        kill_index:(([< `Read | `Set_and_create ], t, Kill_index.t)
                    Fieldslib.Field.t_with_perm -> 'a) ->
        'a list
      module Direct :
        sig
          val iter :
            t ->
            monitor:(([< `Read | `Set_and_create ], t, Monitor.t)
                     Fieldslib.Field.t_with_perm -> t -> Monitor.t -> 'a) ->
            priority:(([< `Read | `Set_and_create ], t, Priority.t)
                      Fieldslib.Field.t_with_perm -> t -> Priority.t -> 'b) ->
            backtrace_history:(([< `Read | `Set_and_create ], t,
                                Core.Std.Backtrace.t list)
                               Fieldslib.Field.t_with_perm ->
                               t -> Core.Std.Backtrace.t list -> 'c) ->
            kill_index:(([< `Read | `Set_and_create ], t, Kill_index.t)
                        Fieldslib.Field.t_with_perm ->
                        t -> Kill_index.t -> 'd) ->
            'd
          val fold :
            t ->
            init:'->
            monitor:('->
                     ([< `Read | `Set_and_create ], t, Monitor.t)
                     Fieldslib.Field.t_with_perm -> t -> Monitor.t -> 'b) ->
            priority:('->
                      ([< `Read | `Set_and_create ], t, Priority.t)
                      Fieldslib.Field.t_with_perm -> t -> Priority.t -> 'c) ->
            backtrace_history:('->
                               ([< `Read | `Set_and_create ], t,
                                Core.Std.Backtrace.t list)
                               Fieldslib.Field.t_with_perm ->
                               t -> Core.Std.Backtrace.t list -> 'd) ->
            kill_index:('->
                        ([< `Read | `Set_and_create ], t, Kill_index.t)
                        Fieldslib.Field.t_with_perm ->
                        t -> Kill_index.t -> 'e) ->
            'e
        end
    end
  val invariant : t -> unit
  val main : t
  val create_like : ?monitor:Monitor.t -> ?priority:Priority.t -> t -> t
  val record_backtrace : t -> t
end