package xapi-stdext-pervasives

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Xapi_stdext_pervasives.PervasiveextSource

Sourceval finally : (unit -> 'a) -> (unit -> unit) -> 'a

finally f g returns f () guaranteeing to run clean-up actions g () even if f () throws an exception.

Sourceval maybe_with_default : 'b -> ('a -> 'b) -> 'a option -> 'b

maybe_with_default d f v is Some f c if v is Some c and d otherwise.

  • deprecated Replace with Option.fold
Sourceval may : ('a -> 'b) -> 'a option -> 'b option

may f v is Some f c if v is Some c and None otherwise.

  • deprecated Replace with Option.map
Sourceval default : 'a -> 'a option -> 'a

default d v is c if o is Some c and d otherwise.

  • deprecated Replace with Option.value
Sourceval maybe : ('a -> unit) -> 'a option -> unit

maybe f v is f c if v is Some c and () otherwise.

  • deprecated Replace with Option.iter
Sourceval reraise_if : bool -> (unit -> unit) -> unit

reraise_if bool fct runs fct (). If not bool ignores raised exceptions

  • deprecated Use ignore_exn instead
Sourceval ignore_exn : (unit -> unit) -> unit
Sourceval ignore_int : int -> unit
Sourceval ignore_int32 : int32 -> unit
Sourceval ignore_int64 : int64 -> unit
Sourceval ignore_string : string -> unit
Sourceval ignore_float : float -> unit
Sourceval ignore_bool : bool -> unit
Sourceval (++) : ('b -> 'c) -> ('a -> 'b) -> 'a -> 'c
  • deprecated Not a standard idiom. Define it locally if needed.
Sourceval ($) : ('a -> 'b) -> 'a -> 'b
  • deprecated Not right-associative. Replace with @@
OCaml

Innovation. Community. Security.