package mirage-block

  1. Overview
  2. Docs
type error = [
  1. | `Unknown of string
    (*

    an undiagnosed error

    *)
  2. | `Unimplemented
    (*

    operation not yet implemented in the code

    *)
  3. | `Is_read_only
    (*

    you cannot write to a read/only instance

    *)
  4. | `Disconnected
    (*

    the device has been previously disconnected

    *)
]

The type for IO operation errors.

exception Error of error

An error value wrapped up in an exception

type 'a result = [
  1. | `Ok of 'a
  2. | `Error of error
]
val ok_exn : 'a result -> 'a

Extract an `Ok x value, or throw an Error exception

module Monad : sig ... end
OCaml

Innovation. Community. Security.