package imap

  1. Overview
  2. Docs
type ('a, 'state, 'err) result =
  1. | Ok of 'a * 'state
  2. | Fail of 'err * 'state
  3. | Need of ImapTypes.input -> ('a, 'state, 'err) result
  4. | Flush of string * unit -> ('a, 'state, 'err) result
type ('a, 'state, 'control) control
val flush : (unit, ImapTypes.state, _) control
val bind : ('a, 'state, 'err) control -> ('a -> ('b, 'state, 'err) control) -> ('b, 'state, 'err) control
val fail : 'err -> (_, _, 'err) control
val send : string -> (unit, ImapTypes.state, _) control
val ret : 'a -> ('a, _, _) control
val gets : ('state -> 'a) -> ('a, 'state, _) control
val modify : ('state -> 'state) -> (unit, 'state, _) control
val get : ('state, 'state, _) control
val put : 'state -> (unit, 'state, _) control
val catch : ('a, 'state, 'err) control -> ('err -> ('a, 'state, 'err) control) -> ('a, 'state, 'err) control
val (>>=) : ('a, 'state, 'err) control -> ('a -> ('b, 'state, 'err) control) -> ('b, 'state, 'err) control
val (>|=) : ('a, 'state, 'err) control -> ('a -> 'b) -> ('b, 'state, 'err) control
val (>>) : (_, 'state, 'err) control -> ('a, 'state, 'err) control -> ('a, 'state, 'err) control
val run : ('a, ImapTypes.state, 'err) control -> ImapTypes.state -> ('a, ImapTypes.state, 'err) result
OCaml

Innovation. Community. Security.