sig
  module type S =
    sig
      type 'a result = ('a, exn) Result.t
      exception Typing_error of Options.category option * string
      exception Not_yet of Options.category option * string
      exception Not_memoized of Options.category option
      val make_untypable : string -> exn
      val make_not_yet : string -> exn
      val make_not_memoized : unit -> exn
      val untypable : string -> 'a
      val not_yet : string -> 'a
      val not_memoized : unit -> 'a
      val print_not_yet : string -> unit
      val handle : ('-> 'a) -> '-> 'a
      val generic_handle : ('-> 'b) -> '-> '-> 'b
      val retrieve_preprocessing :
        string ->
        ('-> 'Error.S.result) ->
        '-> (Stdlib.Format.formatter -> '-> unit) -> 'b
      val pp_result :
        (Stdlib.Format.formatter -> '-> unit) ->
        Stdlib.Format.formatter -> 'Error.S.result -> unit
    end
  module Make : functor (P : sig val phase : Options.category end-> S
  type 'a result = ('a, exn) Result.t
  exception Typing_error of Options.category option * string
  exception Not_yet of Options.category option * string
  exception Not_memoized of Options.category option
  val make_untypable : string -> exn
  val make_not_yet : string -> exn
  val make_not_memoized : unit -> exn
  val untypable : string -> 'a
  val not_yet : string -> 'a
  val not_memoized : unit -> 'a
  val print_not_yet : string -> unit
  val handle : ('-> 'a) -> '-> 'a
  val generic_handle : ('-> 'b) -> '-> '-> 'b
  val retrieve_preprocessing :
    string ->
    ('-> 'b result) -> '-> (Format.formatter -> '-> unit) -> 'b
  val pp_result :
    (Format.formatter -> '-> unit) -> Format.formatter -> 'a result -> unit
end