package elpi

  1. Overview
  2. Docs
type builtins
type flags
type elpi
val init : ?flags:flags -> builtins:builtins list -> basedir:string -> string list -> elpi * 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 handle elpi to an elpi instance equipped with the given 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 runtime 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.