package elpi

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

Initialize ELPI. init must be called before invoking the parser. silent (default true) to avoid printing files being loaded. 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 : (string -> unit) -> unit

Override default error functions (they call exit)

val set_error : (string -> 'a) -> unit
val set_anomaly : (string -> 'a) -> unit
val set_type_error : (string -> 'a) -> unit
val set_std_formatter : Format.formatter -> unit
val set_err_formatter : Format.formatter -> unit
OCaml

Innovation. Community. Security.