package elpi

  1. Overview
  2. Docs

Data of the host program that is opaque to Elpi.

type t
type 'a data_declaration = {
  1. data_name : string;
  2. data_pp : Format.formatter -> 'a -> unit;
  3. data_eq : 'a -> 'a -> bool;
  4. data_hash : 'a -> int;
  5. data_hconsed : bool;
}

The eq function is used by unification. Limitation: unification of * two cdata cannot alter the constraint store. This can be lifted in the * future if there is user request. * * If the data_hconsed is true, then the cin function below will * automatically hashcons the data using the eq and hash functions.

type 'a cdata = {
  1. cin : 'a -> t;
  2. isc : t -> bool;
  3. cout : t -> 'a;
}
val declare : 'a data_declaration -> 'a cdata
val pp : Format.formatter -> t -> unit
val show : t -> string
val equal : t -> t -> bool
val hash : t -> int
val name : t -> string
val hcons : t -> t
val ty2 : 'a cdata -> t -> t -> bool
val morph1 : 'a cdata -> ('a -> 'a) -> t -> t
val morph2 : 'a cdata -> ('a -> 'a -> 'a) -> t -> t -> t
val map : 'a cdata -> 'b cdata -> ('a -> 'b) -> t -> t
OCaml

Innovation. Community. Security.