package brr

  1. Overview
  2. Docs
Browser programming toolkit for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

brr-0.0.8.tbz
sha512=49e7bfbad2ea6a0139354e4a33c59c8a113c4c1e20a4f629bc5cad24aa801e474b4af10ce35adbda5d23dd294d1de5efa5b10bb3030d03f4758459977250a0f6

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

Module Brr_ocaml_poke_ui.HistorySource

Prompt history data structure.

Sourcetype t

The type for prompt histories.

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

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

Sourceval empty : t

empty is an empty history.

Sourceval entries : t -> Jstr.t list

entries h are all the entries in the history.

Sourceval add : t -> Jstr.t -> t

add h e makes adds entry v to history.

Sourceval restart : t -> t

restart

Sourceval 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).

Sourceval 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).

Sourceval 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.

Sourceval 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.