1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
open! Core
module Input = struct
type (_, _) t =
| Text : (string option, string) t
| Integer : (unit, int) t
| Single_selection : ('a list * ('a -> string), 'a) t
| Multi_selection : ('a list * ('a -> string), 'a list) t
end
module Output = struct
type (_, _) t =
| Text : (Output_text_options.t, string) t
| Math : (Output_text_options.t, Math.t) t
| Title : (unit, string) t
end
module type S = sig
type t
module Http_client : Cohttp_lwt.S.Client
val input : t -> ('settings, 'a) Input.t -> 'settings -> unit -> 'a Lwt.t
val input_text : ?prompt:string -> t -> unit -> string Lwt.t
val input_integer : t -> unit -> int Lwt.t
val input_single_selection :
t -> 'a list -> ('a -> string) -> unit -> 'a Lwt.t
val input_single_selection_string : t -> string list -> unit -> string Lwt.t
val input_multi_selection :
t -> 'a list -> ('a -> string) -> unit -> 'a list Lwt.t
val input_multi_selection_string :
t -> string list -> unit -> string list Lwt.t
val output :
?options:'options ->
t ->
('options, 'a) Output.t ->
'a ->
unit ->
unit Lwt.t
val output_text :
?options:Output_text_options.t -> t -> string -> unit -> unit Lwt.t
val output_math :
?options:Output_text_options.t -> t -> Math.t -> unit -> unit Lwt.t
val output_title : t -> string -> unit -> unit Lwt.t
val with_progress_bar :
?label:string ->
t ->
maximum:int ->
f:(increment_progress_bar:(unit -> unit Lwt.t) -> unit -> 'a Lwt.t) ->
unit ->
'a Lwt.t
end