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