Frama-C API - Make
 Functor to build an Error module for a given phase.
Parameters
module _ : sig ... endSignature
type 'a result = ('a, exn) Frama_c_kernel.Result.tRepresent either a result of type 'a or an error with an exception.
exception Typing_error of Frama_c_kernel.Cil_datatype.Location.t * Options.category option * stringTyping error where the first element is the phase where the error occurred and the second element is the error message.
exception Not_yet of Frama_c_kernel.Cil_datatype.Location.t * Options.category option * string"Not yet supported" error where the first element is the phase where the error occurred and the second element is the error message.
exception Not_memoized of Frama_c_kernel.Cil_datatype.Location.t * Options.category option"Not memoized" error with the phase where the error occurred.
val make_untypable : ?loc:Frama_c_kernel.Cil_datatype.Location.t -> string -> exnMake a Typing_error exception with the given message.
val make_not_yet : ?loc:Frama_c_kernel.Cil_datatype.Location.t -> string -> exnMake a Not_yet exception with the given message.
val make_not_memoized : ?loc:Frama_c_kernel.Cil_datatype.Location.t -> unit -> exnMake a Not_memoized exception with the given message.
val untypable : ?loc:Frama_c_kernel.Cil_datatype.Location.t -> string -> 'aval not_yet : ?loc:Frama_c_kernel.Cil_datatype.Location.t -> string -> 'aval not_memoized : ?loc:Frama_c_kernel.Cil_datatype.Location.t -> unit -> 'aPrint the "not yet supported" message without raising an exception.
Run the closure with the given argument and handle potential errors. Return the provide argument in case of errors.
Run the closure with the given argument and handle potential errors. Return the additional argument in case of errors.
val retrieve_preprocessing : string -> ('a -> 'b result) -> 'a -> (Stdlib.Format.formatter -> 'a -> unit) -> 'bRetrieve the result of a preprocessing phase, which possibly failed. The string argument and the formatter are used to display a message in case the preprocessing phase did not compute the required result.
val pp_result : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a result -> unitpp_result pp where pp is a formatter for 'a returns a formatter for 'a result.
val iter : ('a -> unit) -> 'a result -> unitval map : ('a -> 'b) -> 'a result -> 'b