Module Logtk.Scoped

Scoped Value

type scope = int
type +'a t = 'a * scope
val make : 'a -> int -> 'a t
val get : 'a t -> 'a
val scope : _ t -> int
val set : 'a t -> 'b -> 'b t

set v x is x with the same scope as v

val same_scope : _ t -> _ t -> bool
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val compare : 'a CCOrd.t -> 'a t CCOrd.t
val hash : 'a Hash.t -> 'a t -> int
val map : ('a -> 'b) -> 'a t -> 'b t
val on : ('a -> 'b) -> 'a t -> 'b
val on2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c
val pp : 'a CCFormat.printer -> 'a t CCFormat.printer
val to_string : 'a CCFormat.printer -> 'a t -> string