package current

  1. Overview
  2. Docs

Source file output.ml

1
2
3
4
5
6
7
8
9
10
11
type active = [`Ready | `Running]
  [@@deriving eq]

type 'a t = ('a, [`Active of active | `Msg of string]) result
  [@@deriving eq]

let pp ok f = function
  | Ok x -> Fmt.pf f "Ok: %a" ok x
  | Error (`Active `Ready) -> Fmt.string f "Ready"
  | Error (`Active `Running) -> Fmt.string f "Running"
  | Error (`Msg e) -> Fmt.pf f "Error: %s" e
OCaml

Innovation. Community. Security.