package dolmen_model

  1. Overview
  2. Docs
type t

The type of state

type 'a key

The type of keys into the state.

exception Error of t

Convenient exception.

exception Key_not_found of t * string * string

Exception raised by `get` when the key is not bound.

val create_key : pipe:string -> string -> _ key

create a new key

val get : 'a key -> t -> 'a

get the value associated to a key.

val get_or : default:'a -> 'a key -> t -> 'a

get the value associated to a key, or the default if the key is not bound.

val set : 'a key -> 'a -> t -> t

Set the value associated to a key.

val warn : ?file:_ Dolmen_loop.State.file -> ?loc:Dolmen.Std.Loc.full -> t -> 'a Dolmen_loop.Report.Warning.t -> 'a -> t

Emit a warning

val error : ?file:_ Dolmen_loop.State.file -> ?loc:Dolmen.Std.Loc.full -> t -> 'a Dolmen_loop.Report.Error.t -> 'a -> t

Emit an error.

val debug : bool key
val max_warn : int key
val cur_warn : int key
val time_limit : float key
val size_limit : float key
OCaml

Innovation. Community. Security.