package elpi

  1. Overview
  2. Docs

In order to implement quotations one may * need to stick some data into the compiler state that can indeed be * extended. A piece of compiler state can also be kept and used at runtime, * e.g. if it contains some custom constraints, see CustomConstraint

type t
type 'a component
val declare : name:string -> init:(unit -> 'a) -> pp:(Format.formatter -> 'a -> unit) -> 'a component
val get : 'a component -> t -> 'a
val set : 'a component -> t -> 'a -> t
val update : 'a component -> t -> ('a -> 'a) -> t
val update_return : 'a component -> t -> ('a -> 'a * 'b) -> t * 'b
OCaml

Innovation. Community. Security.