package genspio

  1. Overview
  2. Docs
type internal_error_details = {
  1. variable : string;
  2. content : string;
  3. code : string;
}
val pp_internal_error_details : big_string:(Format.formatter -> string -> unit) -> Format.formatter -> internal_error_details -> unit
type death_message =
  1. | User of string
  2. | C_string_failure of internal_error_details
  3. | String_to_int_failure of internal_error_details
val pp_death_message : ?style:[< `Lispy | `User Lispy ] -> big_string:(Format.formatter -> string -> unit) -> Format.formatter -> death_message -> unit
type death_function = comment_stack:string list -> death_message -> string
type output_parameters = {
  1. statement_separator : string;
  2. die_command : death_function option;
  3. max_argument_length : int option;
}
type internal_representation =
  1. | Unit of string
  2. | Octostring of string
  3. | Int of string
  4. | Bool of string
  5. | List of string
  6. | Death of string
val ir_unit : string -> internal_representation
val ir_octostring : string -> internal_representation
val ir_int : string -> internal_representation
val ir_bool : string -> internal_representation
val ir_death : string -> internal_representation
val ir_list : string -> internal_representation
val ir_to_shell : internal_representation -> string
type compilation_error = {
  1. error : [ `No_fail_configured of death_message | `Max_argument_length of string | `Not_a_c_string of string ];
  2. code : string option;
  3. comment_backtrace : string list;
}
exception Compilation of compilation_error
val error : ?code:string -> comment_backtrace:string list -> [ `Max_argument_length of string | `No_fail_configured of death_message | `Not_a_c_string of string ] -> 'a
val pp_error : Format.formatter -> compilation_error -> unit
val to_ir : 'a. string list -> output_parameters -> 'a Language.t -> internal_representation
val to_shell : output_parameters -> 'a Language.t -> string
val with_die_function : print_failure:(comment_stack:'a -> 'b -> string) -> statement_separator:string -> signal_name:string -> ?trap:[< `Exit_with of int | `None Exit_with ] -> (die:(comment_stack:'c -> 'd -> string) -> string) -> string