package elpi

  1. Overview
  2. Docs
type builtins
type program_header
val init : builtins:builtins -> basedir:string -> string list -> program_header * string list

Initialize ELPI. init must be called before invoking the parser. builtins the set of built-in predicates, eg Elpi_builtin.std_builtins basedir current working directory (used to make paths absolute); argv is list of options, see the usage string; It returns part of argv not relevant to ELPI and a program_header that contains the declaration of builtins.

val usage : string

Usage string

val trace : string list -> unit

Set tracing options. trace argv can be called before Execute. argv is expected to only contain options relevant for the tracing facility.

val set_warn : (?loc:Ast.Loc.t -> string -> unit) -> unit

Override default error functions (they call exit)

val set_error : (?loc:Ast.Loc.t -> string -> 'a) -> unit
val set_anomaly : (?loc:Ast.Loc.t -> string -> 'a) -> unit
val set_type_error : (?loc:Ast.Loc.t -> string -> 'a) -> unit
val set_std_formatter : Format.formatter -> unit
val set_err_formatter : Format.formatter -> unit
OCaml

Innovation. Community. Security.