https://github.com/mirage/mirage/blob/master/types/V1.mli#L2...
type error = [
| `Unknown of string (** an undiagnosed error *)
| `Unimplemented (** operation not yet implemented in the code *)
| `Is_read_only (** you cannot write to a read/only instance *)
| `Disconnected (** the device has been previously disconnected *)
]
val read: t -> int64 -> page_aligned_buffer list ->
[ `Error of error | `Ok of unit ] io
This lets the larger scale module assembly fit together with explicit checking that each device driver connected and initialised ok, and is the equivalent of basic checked exceptions. Completely checked exceptions are something of a pain to work with...