Dune's unstable standard library
Module type
Class type
Library stdune
type t =
| Live of unit -> User_message.Style.t Pp.t(*

A "live" value that's updated continuously, such as a progress indicator. This message is not shown when a "dumb" terminal backend is in use.

| Constant of User_message.Style.t Pp.t(*

A fixed value. Unlike with Live, this text is printed even if a dumb console backend is in use.


The current status line

val set : t -> unit
val clear : unit -> unit

Clear the current status line

type overlay
val add_overlay : t -> overlay

Add an overlay on top of the current status line. set and clear remove any active overlay.

val remove_overlay : overlay -> unit

Remove an overlay if it is still active. Do nothing otherwise.

val with_overlay : t -> f:( unit -> 'a ) -> 'a

with_overlay t ~f is the same as:

let id = add_overlay t in
Exn.protect f ~finally:(fun () -> remove_overlay id)
val refresh : unit -> unit