Module Ketrew_pure.Target.State.Flat

module Flat: sig .. end
A “flat” representation of the state (the “normal” representation can be very deep hierarchy, that clients running on weak VMs, like Javascript engines, cannot handle)i.

type state = Ketrew_pure.Target.State.t 
type item = private {
   time : float;
   simple : Ketrew_pure.Target.State.simple;
   name : string;
   message : string option;
   more_info : string list;
   finished : bool;
   depth : int;
}
val item_to_yojson : item -> Yojson.Safe.json
val item_of_yojson : Yojson.Safe.json ->
item Ppx_deriving_yojson_runtime.error_or
val time : item -> float
val simple : item -> Ketrew_pure.Target.State.simple
val name : item -> string
val message : item -> string option
val more_info : item -> string list
val finished : item -> bool
type t = private {
   history : item list;
}
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json ->
t Ppx_deriving_yojson_runtime.error_or
val empty : unit -> t
val of_state : state -> t
val history : t -> item list
val latest : t -> item option
Get the most recent item.
val since : t ->
float -> t option
Filter the history with a date, returning a flat-state containing only newer items if any.
val merge : t ->
t -> t
Merge two flat states into a sorted new one.