Module Rel.Dom

module Dom: sig .. end
Domains.


Domains


type 'a t = 'a Rel.dom 
See Rel.dom.
val v : ?name:string ->
?pp:(Format.formatter -> 'a -> unit) ->
?equal:('a -> 'a -> bool) -> unit -> 'a Rel.dom
v ~name ~pp ~equal is a new domain named name using equal to test values for equality and pp to print them. name defaults to "unknown", equal defaults to Pervasives.( = ) and pp to a formatter that constantly prints "<abstr>").
module type V = sig .. end
The type for modules that can be seen as domains.
val of_type : (module Rel.Dom.V with type t = 'a) -> 'a t
of_type m is a domain from the module m.
val with_dom : ?name:string ->
?pp:(Format.formatter -> 'a -> unit) -> 'a Rel.dom -> 'a Rel.dom
with_dom ~name ~pp d is domain d with name name and pretty-printer pp. The resulting domain is Rel.Dom.equal to d.
val name : 'a Rel.dom -> string
name d is d's name.
val pp_value : 'a Rel.dom -> Format.formatter -> 'a -> unit
pp_value d is d's value pretty-printer.
val equal_value : 'a Rel.dom -> 'a -> 'a -> bool
equal_value d is d's value equality function.
val equal : 'a Rel.dom -> 'b Rel.dom -> bool
equal d0 d1 is true iff d0 and d1 are the same domain.
val pp : Format.formatter -> 'a Rel.dom -> unit
pp ppf d prints d's Rel.Dom.name on ppf.

Base type domains


val unit : unit Rel.dom
unit is a domain for the () value.
val bool : bool Rel.dom
bool is a domain for bool values.
val int : int Rel.dom
int is a domain for int values.
val float : float Rel.dom
float is a domain for float values.
val string : string Rel.dom
string is a domain for string values.

Domains for polymorphic types


val pair : 'a Rel.dom -> 'b Rel.dom -> ('a * 'b) Rel.dom
pair fst snd is a domain for pairs with first projection fst and second projection snd.
val list : 'a Rel.dom -> 'a list Rel.dom
list el is a domain for lists of type 'a.