package elpi

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module API.UtilsSource

Sourceval error : ?loc:Ast.Loc.t -> string -> 'a

A regular error (fatal)

Sourceval anomaly : ?loc:Ast.Loc.t -> string -> 'a

An invariant is broken, i.e. a bug

Sourceval type_error : ?loc:Ast.Loc.t -> string -> 'a

A type error (in principle ruled out by elpi-checker.elpi)

Sourceval warn : ?loc:Ast.Loc.t -> string -> unit

A non fatal warning

Sourceval list_to_lp_list : Data.term list -> Data.term

link between OCaml and LP lists. Note that 1,2|X is not a valid * OCaml list!

Sourceval lp_list_to_list : depth:int -> Data.term -> Data.term list
Sourceval get_assignment : FlexibleData.Elpi.t -> Data.term option

The body of an assignment, if any (LOW LEVEL). * Use look and forget about this API since the term you get * needs to be moved and/or reduced, and you have no API for this.

Sourceval clause_of_term : ?name:string -> ?graft:([ `After | `Before | `Replace | `Remove ] * string) -> depth:int -> Ast.Loc.t -> Data.term -> Ast.program

Hackish, in particular the output should be a compiled program

Sourceval move : from:int -> to_:int -> Data.term -> Data.term

Lifting/restriction/beta (LOW LEVEL, don't use)

Sourceval beta : depth:int -> Data.term -> Data.term list -> Data.term
Sourceval map_acc : (State.t -> 't -> State.t * 'a * Conversion.extra_goals) -> State.t -> 't list -> State.t * 'a list * Conversion.extra_goals

readback/embed on lists

Sourcemodule type Show = sig ... end
Sourcemodule type Show1 = sig ... end
Sourcemodule Map : sig ... end
Sourcemodule Set : sig ... end
Sourcemodule IntSet : Set.S with type elt = int
Sourcemodule LocSet : Set.S with type elt = Ast.Loc.t
OCaml

Innovation. Community. Security.