sig
  val fatal_error : string -> 'a
  val fatal_errorf :
    ('a, Format.formatter, unit, 'b) Pervasives.format4 -> 'a
  exception Fatal_error
  val try_finally : (unit -> 'a) -> (unit -> unit) -> 'a
  val map_end : ('-> 'b) -> 'a list -> 'b list -> 'b list
  val map_left_right : ('-> 'b) -> 'a list -> 'b list
  val for_all2 : ('-> '-> bool) -> 'a list -> 'b list -> bool
  val replicate_list : '-> int -> 'a list
  val list_remove : '-> 'a list -> 'a list
  val split_last : 'a list -> 'a list * 'a
  val may : ('-> unit) -> 'a option -> unit
  val may_map : ('-> 'b) -> 'a option -> 'b option
  type ref_and_value = R : 'Pervasives.ref * '-> Misc.ref_and_value
  val protect_refs : Misc.ref_and_value list -> (unit -> 'a) -> 'a
  module Stdlib :
    sig
      module List :
        sig
          type 'a t = 'a list
          val compare :
            ('-> '-> int) ->
            'Misc.Stdlib.List.t -> 'Misc.Stdlib.List.t -> int
          val equal :
            ('-> '-> bool) ->
            'Misc.Stdlib.List.t -> 'Misc.Stdlib.List.t -> bool
          val filter_map :
            ('-> 'b option) ->
            'Misc.Stdlib.List.t -> 'Misc.Stdlib.List.t
          val some_if_all_elements_are_some :
            'a option Misc.Stdlib.List.t -> 'Misc.Stdlib.List.t option
          val map2_prefix :
            ('-> '-> 'c) ->
            'Misc.Stdlib.List.t ->
            'Misc.Stdlib.List.t ->
            'Misc.Stdlib.List.t * 'Misc.Stdlib.List.t
          val split_at :
            int ->
            'Misc.Stdlib.List.t ->
            'Misc.Stdlib.List.t * 'Misc.Stdlib.List.t
        end
      module Option :
        sig
          type 'a t = 'a option
          val equal :
            ('-> '-> bool) ->
            'Misc.Stdlib.Option.t -> 'Misc.Stdlib.Option.t -> bool
          val iter : ('-> unit) -> 'Misc.Stdlib.Option.t -> unit
          val map :
            ('-> 'b) -> 'Misc.Stdlib.Option.t -> 'Misc.Stdlib.Option.t
          val fold : ('-> '-> 'b) -> 'Misc.Stdlib.Option.t -> '-> 'b
          val value_default :
            ('-> 'b) -> default:'-> 'Misc.Stdlib.Option.t -> 'b
        end
      module Array :
        sig
          val exists2 : ('-> '-> bool) -> 'a array -> 'b array -> bool
        end
    end
  val find_in_path : string list -> string -> string
  val find_in_path_rel : string list -> string -> string
  val find_in_path_uncap : string list -> string -> string
  val remove_file : string -> unit
  val expand_directory : string -> string -> string
  val create_hashtable : int -> ('a * 'b) list -> ('a, 'b) Hashtbl.t
  val copy_file : Pervasives.in_channel -> Pervasives.out_channel -> unit
  val copy_file_chunk :
    Pervasives.in_channel -> Pervasives.out_channel -> int -> unit
  val string_of_file : Pervasives.in_channel -> string
  val output_to_file_via_temporary :
    ?mode:Pervasives.open_flag list ->
    string -> (string -> Pervasives.out_channel -> 'a) -> 'a
  val log2 : int -> int
  val align : int -> int -> int
  val no_overflow_add : int -> int -> bool
  val no_overflow_sub : int -> int -> bool
  val no_overflow_mul : int -> int -> bool
  val no_overflow_lsl : int -> int -> bool
  module Int_literal_converter :
    sig
      val int : string -> int
      val int32 : string -> int32
      val int64 : string -> int64
      val nativeint : string -> nativeint
    end
  val chop_extensions : string -> string
  val search_substring : string -> string -> int -> int
  val replace_substring : before:string -> after:string -> string -> string
  val rev_split_words : string -> string list
  val get_ref : 'a list Pervasives.ref -> 'a list
  val fst3 : 'a * 'b * '-> 'a
  val snd3 : 'a * 'b * '-> 'b
  val thd3 : 'a * 'b * '-> 'c
  val fst4 : 'a * 'b * 'c * '-> 'a
  val snd4 : 'a * 'b * 'c * '-> 'b
  val thd4 : 'a * 'b * 'c * '-> 'c
  val for4 : 'a * 'b * 'c * '-> 'd
  module LongString :
    sig
      type t = bytes array
      val create : int -> Misc.LongString.t
      val length : Misc.LongString.t -> int
      val get : Misc.LongString.t -> int -> char
      val set : Misc.LongString.t -> int -> char -> unit
      val blit :
        Misc.LongString.t -> int -> Misc.LongString.t -> int -> int -> unit
      val output :
        Pervasives.out_channel -> Misc.LongString.t -> int -> int -> unit
      val unsafe_blit_to_bytes :
        Misc.LongString.t -> int -> bytes -> int -> int -> unit
      val input_bytes : Pervasives.in_channel -> int -> Misc.LongString.t
    end
  val edit_distance : string -> string -> int -> int option
  val spellcheck : string list -> string -> string list
  val did_you_mean : Format.formatter -> (unit -> string list) -> unit
  val cut_at : string -> char -> string * string
  module StringSet :
    sig
      type elt = string
      type t
      val empty : t
      val is_empty : t -> bool
      val mem : elt -> t -> bool
      val add : elt -> t -> t
      val singleton : elt -> t
      val remove : elt -> t -> t
      val union : t -> t -> t
      val inter : t -> t -> t
      val diff : t -> t -> t
      val compare : t -> t -> int
      val equal : t -> t -> bool
      val subset : t -> t -> bool
      val iter : (elt -> unit) -> t -> unit
      val map : (elt -> elt) -> t -> t
      val fold : (elt -> '-> 'a) -> t -> '-> 'a
      val for_all : (elt -> bool) -> t -> bool
      val exists : (elt -> bool) -> t -> bool
      val filter : (elt -> bool) -> t -> t
      val partition : (elt -> bool) -> t -> t * t
      val cardinal : t -> int
      val elements : t -> elt list
      val min_elt : t -> elt
      val min_elt_opt : t -> elt option
      val max_elt : t -> elt
      val max_elt_opt : t -> elt option
      val choose : t -> elt
      val choose_opt : t -> elt option
      val split : elt -> t -> t * bool * t
      val find : elt -> t -> elt
      val find_opt : elt -> t -> elt option
      val find_first : (elt -> bool) -> t -> elt
      val find_first_opt : (elt -> bool) -> t -> elt option
      val find_last : (elt -> bool) -> t -> elt
      val find_last_opt : (elt -> bool) -> t -> elt option
      val of_list : elt list -> t
    end
  module StringMap :
    sig
      type key = string
      type +'a t
      val empty : 'a t
      val is_empty : 'a t -> bool
      val mem : key -> 'a t -> bool
      val add : key -> '-> 'a t -> 'a t
      val update : key -> ('a option -> 'a option) -> 'a t -> 'a t
      val singleton : key -> '-> 'a t
      val remove : key -> 'a t -> 'a t
      val merge :
        (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t
      val union : (key -> '-> '-> 'a option) -> 'a t -> 'a t -> 'a t
      val compare : ('-> '-> int) -> 'a t -> 'a t -> int
      val equal : ('-> '-> bool) -> 'a t -> 'a t -> bool
      val iter : (key -> '-> unit) -> 'a t -> unit
      val fold : (key -> '-> '-> 'b) -> 'a t -> '-> 'b
      val for_all : (key -> '-> bool) -> 'a t -> bool
      val exists : (key -> '-> bool) -> 'a t -> bool
      val filter : (key -> '-> bool) -> 'a t -> 'a t
      val partition : (key -> '-> bool) -> 'a t -> 'a t * 'a t
      val cardinal : 'a t -> int
      val bindings : 'a t -> (key * 'a) list
      val min_binding : 'a t -> key * 'a
      val min_binding_opt : 'a t -> (key * 'a) option
      val max_binding : 'a t -> key * 'a
      val max_binding_opt : 'a t -> (key * 'a) option
      val choose : 'a t -> key * 'a
      val choose_opt : 'a t -> (key * 'a) option
      val split : key -> 'a t -> 'a t * 'a option * 'a t
      val find : key -> 'a t -> 'a
      val find_opt : key -> 'a t -> 'a option
      val find_first : (key -> bool) -> 'a t -> key * 'a
      val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option
      val find_last : (key -> bool) -> 'a t -> key * 'a
      val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option
      val map : ('-> 'b) -> 'a t -> 'b t
      val mapi : (key -> '-> 'b) -> 'a t -> 'b t
    end
  module Color :
    sig
      type color =
          Black
        | Red
        | Green
        | Yellow
        | Blue
        | Magenta
        | Cyan
        | White
      type style =
          FG of Misc.Color.color
        | BG of Misc.Color.color
        | Bold
        | Reset
      val ansi_of_style_l : Misc.Color.style list -> string
      type styles = {
        error : Misc.Color.style list;
        warning : Misc.Color.style list;
        loc : Misc.Color.style list;
      }
      val default_styles : Misc.Color.styles
      val get_styles : unit -> Misc.Color.styles
      val set_styles : Misc.Color.styles -> unit
      type setting = Auto | Always | Never
      val setup : Misc.Color.setting option -> unit
      val set_color_tag_handling : Format.formatter -> unit
    end
  val normalise_eol : string -> string
  val delete_eol_spaces : string -> string
  type hook_info = { sourcefile : string; }
  exception HookExnWrapper of { error : exn; hook_name : string;
              hook_info : Misc.hook_info;
            }
  val raise_direct_hook_exn : exn -> 'a
  module type HookSig =
    sig
      type t
      val add_hook :
        string ->
        (Misc.hook_info -> Misc.HookSig.t -> Misc.HookSig.t) -> unit
      val apply_hooks : Misc.hook_info -> Misc.HookSig.t -> Misc.HookSig.t
    end
  module MakeHooks :
    functor (M : sig type t end->
      sig
        type t = M.t
        val add_hook : string -> (hook_info -> t -> t) -> unit
        val apply_hooks : hook_info -> t -> t
      end
end