Module Mavryk_client_001_PtAtLas.Limit

This helper module allows to handle partially specified limits during the injection process.

type 'a t

A value of type 'a t is either unknown of known.

val unknown : 'a t
val known : 'a -> 'a t
val of_option : 'a option -> 'a t
val is_unknown : 'a t -> bool
val join : where:string -> ('a -> 'a -> bool) -> 'a t -> 'a t -> 'a t Mavryk_base.TzPervasives.tzresult

join ~where eq x y computes the order-theoretic union of x and y. If both x and y are not Unknown, the function fails iff their contents are not equal according to eq.

val fold : unknown:'a -> known:('b -> 'a) -> 'b t -> 'a
val get : when_unknown:string -> 'a t -> 'a Mavryk_base.TzPervasives.tzresult
val value : when_unknown:'a -> 'a t -> 'a