Batteries user guide : BatRef

`sig
type 'a t = 'a Pervasives.ref
external ref : 'a -> 'a Pervasives.ref = "%makemutable"
external ( ! ) : 'a Pervasives.ref -> 'a = "%field0"
external ( := ) : 'a Pervasives.ref -> 'a -> unit = "%setfield0"
external set : 'a Pervasives.ref -> 'a -> unit = "%setfield0"
external get : 'a Pervasives.ref -> 'a = "%field0"
val copy : 'a Pervasives.ref -> 'a Pervasives.ref
val pre : 'a Pervasives.ref -> ('a -> 'a) -> 'a
val post : 'a Pervasives.ref -> ('a -> 'a) -> 'a
val swap : 'a Pervasives.ref -> 'a Pervasives.ref -> unit
val post_incr : int Pervasives.ref -> int
val post_decr : int Pervasives.ref -> int
val pre_incr : int Pervasives.ref -> int
val pre_decr : int Pervasives.ref -> int
val protect : 'a Pervasives.ref -> 'a -> (unit -> 'b) -> 'b
val toggle : bool Pervasives.ref -> unit
val oset : 'a option Pervasives.ref -> 'a -> unit
val oget_exn : 'a option Pervasives.ref -> 'a
val print :
('b BatInnerIO.output -> 'a -> unit) ->
'b BatInnerIO.output -> 'a BatRef.t -> unit
val compare : 'a BatOrd.comp -> 'a Pervasives.ref BatOrd.comp
val ord : 'a BatOrd.ord -> 'a Pervasives.ref BatOrd.ord
val eq : 'a BatOrd.eq -> 'a Pervasives.ref BatOrd.eq
end`