package brr

  1. Overview
  2. Docs
Browser programming toolkit for OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

brr-0.0.7.tbz
sha512=4b3d42eb6a32c1d6f1c5ef003f5311b5029156b31f6e51af098b695c769699e0304b66afd2dd574ecf1084e095bbbc4eac552daab083766cd81ed2f1d9897d51

doc/brr.ocaml_poke_ui/Brr_ocaml_poke_ui/History/index.html

Module Brr_ocaml_poke_ui.History

Prompt history data structure.

type t

The type for prompt histories.

val v : prev:Jstr.t list -> t

v ~prev initializes the toplevel with previous entries prev (later elements are older).

val empty : t

empty is an empty history.

val entries : t -> Jstr.t list

entries h are all the entries in the history.

val add : t -> Jstr.t -> t

add h e makes adds entry v to history.

val restart : t -> t

restart

val prev : t -> Jstr.t -> (t * Jstr.t) option

prev h current makes current the next entry of the resulting history and returns the previous entry of h (if any).

val next : t -> Jstr.t -> (t * Jstr.t) option

next h current makes current the previous entry of the resulting history and returns the next entry of h (if any).

val to_string : sep:Jstr.t -> t -> Jstr.t

to_string ~sep t is a string with the entries of t separated by lines that contain sep.

val of_string : sep:Jstr.t -> Jstr.t -> t

of_string ~sep s is history from s assumed to be entries seperated by lines that contain sep.

OCaml

Innovation. Community. Security.