package async_interactive

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Async_interactiveSource

Sourceval interactive : bool Core.ref
Sourceval print_string : string -> unit Async.Deferred.t

These print* functions only print when !interactive.

Sourceval print_endline : string -> unit Async.Deferred.t
Sourceval printf : ('r, unit, string, unit Async.Deferred.t) Core.format4 -> 'r
Sourceval prints : string -> 'a -> ('a -> Async.Sexp.t) -> unit Async.Deferred.t
Sourceval print_s : Async.Sexp.t -> unit Async.Deferred.t
Sourceval ask_dispatch_gen : f:(string -> ('a, string) Core.Result.t) -> string -> 'a Async.Deferred.t
Sourcemodule Choice : sig ... end
Sourceval ask_dispatch_with_help : ?show_options:bool -> ?show_help:bool -> string -> 'a Choice.t list -> 'a Async.Deferred.t

ask_dispatch_gen question choices displays question and gets user input to select one of the choices. At most once choice can be the default choice.

Sourceval ask_yn : ?default:bool -> string -> bool Async.Deferred.t
Sourceval ask_ynf : ?default:bool -> ('a, unit, string, bool Async.Deferred.t) Core.format4 -> 'a
Sourceval arithmetic_challenge_exn : ?red:unit -> unit -> unit Async.Deferred.t

This will prompt the user to solve a math problem and exit if they fail. red will make the prompt print in red the the screen to make it more visually loud

This will raise if no input or incorrect input is given

Sourceval show_file : ?pager:string -> ?msg:string -> file:string -> unit -> unit Async.Deferred.t

These show* functions print even when not !interactive.

Sourceval show_string_with_pager : ?pager:string -> string -> unit Async.Deferred.t
Sourceval with_writer_to_pager : ?pager:string -> unit -> f:(Async.Writer.t -> 'a Async.Deferred.t) -> 'a Async.Deferred.t
Sourcemodule Job : sig ... end