package caqti

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type +'a t

A concurrency monad with an optional failure monad, or just the identity type constructor for blocking operation.

module Infix : sig ... end
val return : 'a -> 'a t

Return operation of the concurrency monad.

val catch : (unit -> 'a t) -> (exn -> 'a t) -> 'a t
val finally : (unit -> 'a t) -> (unit -> unit t) -> 'a t

finally f g runs f () and then runs g () whether the former finished, failed with an exception, or failed with a monadic failure.

val cleanup : (unit -> 'a t) -> (unit -> unit t) -> 'a t

cleanup f g runs f () and then runs g () and re-raise the failure if and only if f () failed with an exception or a monadic failure.

OCaml

Innovation. Community. Security.