package elpi

  1. Overview
  2. Docs
type builtins
type flags
type elpi
val init : ?flags:flags -> builtins:builtins list -> ?file_resolver:(?cwd:string -> unit:string -> unit -> string) -> ?legacy_parser:bool -> unit -> elpi

Initialize ELPI.

init must be called before invoking the parser.

  • parameter file_resolver

    maps a file name to an absolute path, if not specified the options like -I or the env variable TJPATH serve as resolver. The resolver returns the abslute file name (possibly adjusting the unit extension). By default it fails. See also Parse.std_resolver.

  • returns

    a handle elpi to an elpi instance equipped with the given builtins and where accumulate resolves files with the given file_resolver.

val usage : string

Usage string

val trace : string list -> string list

Set tracing options. trace argv can be called before Execute. returns options not known to the trace system.

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
val legacy_parser_available : bool

The legacy parser is an optional build dependency

OCaml

Innovation. Community. Security.