Module Util
val pervasives_ref : 'a -> 'a Stdlib.ref
val pervasives_compare : 'a -> 'a -> int
val (!) : 'a Stdlib.ref -> 'a
val (+) : int -> int -> int
val (-) : int -> int -> int
val on_fst : ('a -> 'b) -> ('a * 'c) -> 'b * 'c
val on_snd : ('a -> 'b) -> ('c * 'a) -> 'c * 'b
val map_pair : ('a -> 'b) -> ('a * 'a) -> 'b * 'b
val on_pi1 : ('a -> 'b) -> ('a * 'c * 'd) -> 'b * 'c * 'd
val on_pi2 : ('a -> 'b) -> ('c * 'a * 'd) -> 'c * 'b * 'd
val on_pi3 : ('a -> 'b) -> ('c * 'd * 'a) -> 'c * 'd * 'b
Projections from triplets
Chars.
Empty type
module Empty : sig ... end
Strings.
module String : CString.ExtS
Lists.
module List : CList.ExtS
Arrays.
module Array : CArray.ExtS
Sets.
Maps.
Streams.
Matrices.
Functions.
Delayed computations.
val delayed_force : 'a delayed -> 'a
val try_finally : ('a -> 'b) -> 'a -> ('c -> unit) -> 'c -> 'b
try_finally f x g y
applies the main codef
tox
and returns the result after having applied the finalization codeg
toy
. If the main code raises the exceptionexn
, the finalization code is executed andexn
is raised. If the finalization code itself fails, the exception returned is always the one from the finalization code. Credit X.Leroy, D.Remy.
Enriched exceptions
type iexn
= Exninfo.iexn
val iraise : Exninfo.iexn -> 'a
Misc.
type ('a, 'b) union
= ('a, 'b) CSig.union
=
|
Inl of 'a
|
Inr of 'b
Union type
module Union : sig ... end
type 'a until
= 'a CSig.until
=
|
Stop of 'a
|
Cont of 'a
Used for browsable-until structures.
type ('a, 'b) eq
= ('a, 'b) CSig.eq
=
|
Refl : ('a, 'a) eq