Module Carcass.Ask

module Ask: sig .. end
Ask values on standard input.

Asking values

type ('a, 'b) t = ('a, Format.formatter, unit, 'b) Pervasives.format4 -> 'a 
The type for questions formatted according to 'a and whose result is 'b.
val value : ?ppf:Format.formatter ->
parse:(string -> ('a, 'b) Result.result) ->
('c, ('a, 'b) Result.result) t
value ~parse asks for a value parsed according to parse. The question is written on ppf (Defaults to Fmt.stdout).
val pattern : ?ppf:Format.formatter ->
('a, (Carcass.Pat.t, [> Carcass.Error.parse ]) Result.result) t
pattern asks for a pattern.
val bool : ?ppf:Format.formatter -> default:bool -> ('a, bool) t
bool asks for a boolean value. If no input is provided or no boolean sense can be made from the input, defaults to default.
val string : ?ppf:Format.formatter -> default:string -> ('a, string) t
string asks for a string value. If no input is provided defaults to default.