package down

  1. Overview
  2. Docs

Module Down.SessionSource

Manage sessions.

See the manual.

Sessions

Sourcetype name = string

The type for session names. Use "" to denote the last_name session.

Sourceval last_name : unit -> string option

last_name () is the last session name that was used with any of the functions of this module; if any and still existing. Persisted accross ocaml invocations.

Sourceval list : unit -> unit

list () lists available sessions.

Sourceval load : ?silent:bool -> name -> unit

load s loads and executes session s. If silent is true the result of phrases is not printed out (defaults to false).

Sourceval edit : name -> unit

edit s edits session s in your editor. A session is created if s does not exist.

Sourceval of_file : ?replace:bool -> file:string -> name -> unit

of_file ~replace ~file s takes the contents of file file and stores it session s. The function errors if s exists; unless replace is true (defaults to false).

Sourceval delete : name -> unit

delete s deletes session s.

Recording

Note. Unsaved recorded phrases are persisted across ocaml sessions.

Sourceval record : unit -> unit

record starts recording phrases.

Sourceval stop : unit -> unit

stop stops recording phrases.

Sourceval revise : unit -> unit

revise () edits recorded phrases.

Sourceval save : ?replace:bool -> name -> unit

save s saves recorded phrases to s, stops recording and clears the recorded phrases. The function errors and the recorded phrases are kept intact if s exists; unless replace is true (defaults to false). See also append.

Sourceval append : name -> unit

append s is like save except it appends to s or creates it if it does not exist.

Stepping

Sourceval steps : name -> unit

steps () loads a session for stepping through manually via shift-{up,down} (or C-x C-{p,n}).

Sourceval next_step : unit -> unit

next_step () moves to the next step of the stepped session. Usually you do this via shift-down or C-x C-n.

Sourceval prev_step : unit -> unit

prev_step () moves the previous step of the stepped session. Usually you do this via shift-up or C-x C-p.

OCaml

Innovation. Community. Security.