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) -> 'a -> 'a
      val generic_handle : ('a -> 'b) -> 'b -> 'a -> 'b
      val retrieve_preprocessing :
        string ->
        ('a -> 'b Error.S.result) ->
        'a -> (Stdlib.Format.formatter -> 'a -> unit) -> 'b
      val pp_result :
        (Stdlib.Format.formatter -> 'a -> unit) ->
        Stdlib.Format.formatter -> 'a 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) -> 'a -> 'a
  val generic_handle : ('a -> 'b) -> 'b -> 'a -> 'b
  val retrieve_preprocessing :
    string ->
    ('a -> 'b result) -> 'a -> (Format.formatter -> 'a -> unit) -> 'b
  val pp_result :
    (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a result -> unit
end