Return to Roc packages
Documentation
Opt
single
maybe
list
flag
count
arg
maybe_arg
arg_list
bytes
maybe_bytes
bytes_list
str
maybe_str
str_list
dec
maybe_dec
dec_list
f32
maybe_f32
f32_list
f64
maybe_f64
f64_list
u8
maybe_u8
u8_list
u16
maybe_u16
u16_list
u32
maybe_u32
u32_list
u64
maybe_u64
u64_list
u128
maybe_u128
u128_list
i8
maybe_i8
i8_list
i16
maybe_i16
i16_list
i32
maybe_i32
i32_list
i64
maybe_i64
i64_list
i128
maybe_i128
i128_list
Base
ArgParserResult
ArgParserParams
ArgParserState
ArgParser
on_successful_arg_parse
map_successfully_parsed
ArgExtractErr
str_type_name
num_type_name
TextStyle
ExpectedValue
Plurality
SpecialFlags
InvalidValue
DefaultValue
ValueParser
OptionConfigBaseParams
DefaultableOptionConfigBaseParams
OptionConfigParams
DefaultableOptionConfigParams
OptionConfig
help_option
version_option
ParameterConfigBaseParams
DefaultableParameterConfigBaseParams
ParameterConfigParams
DefaultableParameterConfigParams
ParameterConfig
CliConfigParams
CliConfig
SubcommandConfigParams
SubcommandsConfig
SubcommandConfig
Cli
CliParser
map
weave
finish
finish_without_validating
assert_valid
parse_or_display_message
ErrorFormatter
format_arg_extract_err
format_cli_validation_err
Help
help_text
usage_help
Param
single
maybe
list
arg
maybe_arg
arg_list
bytes
maybe_bytes
bytes_list
str
maybe_str
str_list
dec
maybe_dec
dec_list
f32
maybe_f32
f32_list
f64
maybe_f64
f64_list
u8
maybe_u8
u8_list
u16
maybe_u16
u16_list
u32
maybe_u32
u32_list
u64
maybe_u64
u64_list
u128
maybe_u128
u128_list
i8
maybe_i8
i8_list
i16
maybe_i16
i16_list
i32
maybe_i32
i32_list
i64
maybe_i64
i64_list
i128
maybe_i128
i128_list
SubCmd
SubcommandParserConfig
finish
optional
required
Validate
CliValidationErr
validate_cli
(press
s
)
Opt
.
single
: DefaultableOptionConfigParams a -> CliBuilder a GetOptionsAction GetOptionsAction
Opt
.
maybe
: OptionConfigParams data -> CliBuilder (Result data [NoValue]) GetOptionsAction GetOptionsAction
Opt
.
list
: OptionConfigParams data -> CliBuilder (List data) GetOptionsAction GetOptionsAction
Opt
.
flag
: OptionConfigBaseParams -> CliBuilder Bool GetOptionsAction GetOptionsAction
Opt
.
count
: OptionConfigBaseParams -> CliBuilder U64 GetOptionsAction GetOptionsAction
Opt
.
arg
: DefaultableOptionConfigBaseParams Arg -> CliBuilder Arg GetOptionsAction GetOptionsAction
Opt
.
maybe_arg
: OptionConfigBaseParams -> CliBuilder (Result Arg [NoValue]) GetOptionsAction GetOptionsAction
Opt
.
arg_list
: OptionConfigBaseParams -> CliBuilder (List Arg) GetOptionsAction GetOptionsAction
Opt
.
bytes
: DefaultableOptionConfigBaseParams (List U8) -> CliBuilder (List U8) GetOptionsAction GetOptionsAction
Opt
.
maybe_bytes
: OptionConfigBaseParams -> CliBuilder (Result (List U8) [NoValue]) GetOptionsAction GetOptionsAction
Opt
.
bytes_list
: OptionConfigBaseParams -> CliBuilder (List (List U8)) GetOptionsAction GetOptionsAction
Opt
.
str
: DefaultableOptionConfigBaseParams Str -> CliBuilder Str GetOptionsAction GetOptionsAction
Opt
.
maybe_str
: OptionConfigBaseParams -> CliBuilder (Result Str [NoValue]) GetOptionsAction GetOptionsAction
Opt
.
str_list
: OptionConfigBaseParams -> CliBuilder (List Str) GetOptionsAction GetOptionsAction
Opt
.
dec
: DefaultableOptionConfigBaseParams Dec -> CliBuilder Dec GetOptionsAction GetOptionsAction
Opt
.
maybe_dec
: OptionConfigBaseParams -> CliBuilder (Result Dec [NoValue]) GetOptionsAction GetOptionsAction
Opt
.
dec_list
: OptionConfigBaseParams -> CliBuilder (List Dec) GetOptionsAction GetOptionsAction
Opt
.
f32
: DefaultableOptionConfigBaseParams F32 -> CliBuilder F32 GetOptionsAction GetOptionsAction
Opt
.
maybe_f32
: OptionConfigBaseParams -> CliBuilder (Result F32 [NoValue]) GetOptionsAction GetOptionsAction
Opt
.
f32_list
: OptionConfigBaseParams -> CliBuilder (List F32) GetOptionsAction GetOptionsAction
Opt
.
f64
: DefaultableOptionConfigBaseParams F64 -> CliBuilder F64 GetOptionsAction GetOptionsAction
Opt
.
maybe_f64
: OptionConfigBaseParams -> CliBuilder (Result F64 [NoValue]) GetOptionsAction GetOptionsAction
Opt
.
f64_list
: OptionConfigBaseParams -> CliBuilder (List F64) GetOptionsAction GetOptionsAction
Opt
.
u8
: DefaultableOptionConfigBaseParams U8 -> CliBuilder U8 GetOptionsAction GetOptionsAction
Opt
.
maybe_u8
: OptionConfigBaseParams -> CliBuilder (Result U8 [NoValue]) GetOptionsAction GetOptionsAction
Opt
.
u8_list
: OptionConfigBaseParams -> CliBuilder (List U8) GetOptionsAction GetOptionsAction
Opt
.
u16
: DefaultableOptionConfigBaseParams U16 -> CliBuilder U16 GetOptionsAction GetOptionsAction
Opt
.
maybe_u16
: OptionConfigBaseParams -> CliBuilder (Result U16 [NoValue]) GetOptionsAction GetOptionsAction
Opt
.
u16_list
: OptionConfigBaseParams -> CliBuilder (List U16) GetOptionsAction GetOptionsAction
Opt
.
u32
: DefaultableOptionConfigBaseParams U32 -> CliBuilder U32 GetOptionsAction GetOptionsAction
Opt
.
maybe_u32
: OptionConfigBaseParams -> CliBuilder (Result U32 [NoValue]) GetOptionsAction GetOptionsAction
Opt
.
u32_list
: OptionConfigBaseParams -> CliBuilder (List U32) GetOptionsAction GetOptionsAction
Opt
.
u64
: DefaultableOptionConfigBaseParams U64 -> CliBuilder U64 GetOptionsAction GetOptionsAction
Opt
.
maybe_u64
: OptionConfigBaseParams -> CliBuilder (Result U64 [NoValue]) GetOptionsAction GetOptionsAction
Opt
.
u64_list
: OptionConfigBaseParams -> CliBuilder (List U64) GetOptionsAction GetOptionsAction
Opt
.
u128
: DefaultableOptionConfigBaseParams U128 -> CliBuilder U128 GetOptionsAction GetOptionsAction
Opt
.
maybe_u128
: OptionConfigBaseParams -> CliBuilder (Result U128 [NoValue]) GetOptionsAction GetOptionsAction
Opt
.
u128_list
: OptionConfigBaseParams -> CliBuilder (List U128) GetOptionsAction GetOptionsAction
Opt
.
i8
: DefaultableOptionConfigBaseParams I8 -> CliBuilder I8 GetOptionsAction GetOptionsAction
Opt
.
maybe_i8
: OptionConfigBaseParams -> CliBuilder (Result I8 [NoValue]) GetOptionsAction GetOptionsAction
Opt
.
i8_list
: OptionConfigBaseParams -> CliBuilder (List I8) GetOptionsAction GetOptionsAction
Opt
.
i16
: DefaultableOptionConfigBaseParams I16 -> CliBuilder I16 GetOptionsAction GetOptionsAction
Opt
.
maybe_i16
: OptionConfigBaseParams -> CliBuilder (Result I16 [NoValue]) GetOptionsAction GetOptionsAction
Opt
.
i16_list
: OptionConfigBaseParams -> CliBuilder (List I16) GetOptionsAction GetOptionsAction
Opt
.
i32
: DefaultableOptionConfigBaseParams I32 -> CliBuilder I32 GetOptionsAction GetOptionsAction
Opt
.
maybe_i32
: OptionConfigBaseParams -> CliBuilder (Result I32 [NoValue]) GetOptionsAction GetOptionsAction
Opt
.
i32_list
: OptionConfigBaseParams -> CliBuilder (List I32) GetOptionsAction GetOptionsAction
Opt
.
i64
: DefaultableOptionConfigBaseParams I64 -> CliBuilder I64 GetOptionsAction GetOptionsAction
Opt
.
maybe_i64
: OptionConfigBaseParams -> CliBuilder (Result I64 [NoValue]) GetOptionsAction GetOptionsAction
Opt
.
i64_list
: OptionConfigBaseParams -> CliBuilder (List I64) GetOptionsAction GetOptionsAction
Opt
.
i128
: DefaultableOptionConfigBaseParams I128 -> CliBuilder I128 GetOptionsAction GetOptionsAction
Opt
.
maybe_i128
: OptionConfigBaseParams -> CliBuilder (Result I128 [NoValue]) GetOptionsAction GetOptionsAction
Opt
.
i128_list
: OptionConfigBaseParams -> CliBuilder (List I128) GetOptionsAction GetOptionsAction
Base
.
ArgParserResult
Base
.
ArgParserParams
Base
.
ArgParserState
Base
.
ArgParser
Base
.
on_successful_arg_parse
: ArgParser a, (ArgParserState a -> ArgParserResult (ArgParserState b)) -> ArgParser b
Base
.
map_successfully_parsed
: ArgParserResult a, (a -> b) -> ArgParserResult b
Base
.
ArgExtractErr
Base
.
str_type_name
Base
.
num_type_name
Base
.
TextStyle
: [ Color, Plain ]
Base
.
ExpectedValue
Base
.
Plurality
: [ Optional, One, Many ]
Base
.
SpecialFlags
Base
.
InvalidValue
Base
.
DefaultValue
: [ NoDefault, Value a, Generate ({} -> a) ]
Base
.
ValueParser
Base
.
OptionConfigBaseParams
Base
.
DefaultableOptionConfigBaseParams
Base
.
OptionConfigParams
Base
.
DefaultableOptionConfigParams
Base
.
OptionConfig
Base
.
help_option
: OptionConfig
Base
.
version_option
: OptionConfig
Base
.
ParameterConfigBaseParams
Base
.
DefaultableParameterConfigBaseParams
Base
.
ParameterConfigParams
Base
.
DefaultableParameterConfigParams
Base
.
ParameterConfig
Base
.
CliConfigParams
Base
.
CliConfig
Base
.
SubcommandConfigParams
Base
.
SubcommandsConfig
Base
.
SubcommandConfig
Cli
.
CliParser
Cli
.
map
: CliBuilder a from_action to_action, (a -> b) -> CliBuilder b from_action to_action
Cli
.
weave
: CliBuilder a action1 action2, CliBuilder b action2 action3, (a, b -> c) -> CliBuilder c action1 action3
Cli
.
finish
: CliBuilder data from_action to_action, CliConfigParams -> Result (CliParser data) CliValidationErr
Cli
.
finish_without_validating
: CliBuilder data from_action to_action, CliConfigParams -> CliParser data
Cli
.
assert_valid
: Result (CliParser data) CliValidationErr -> CliParser data
Cli
.
parse_or_display_message
: CliParser data, List arg, (arg -> [ Unix (List U8), Windows (List U16) ]) -> Result data Str
ErrorFormatter
.
format_arg_extract_err
: ArgExtractErr -> Str
ErrorFormatter
.
format_cli_validation_err
: CliValidationErr -> Str
Help
.
help_text
: CliConfig, List Str, TextStyle -> Str
Help
.
usage_help
: CliConfig, List Str, TextStyle -> Str
Param
.
single
: DefaultableParameterConfigParams data -> CliBuilder data {}action GetParamsAction
Param
.
maybe
: ParameterConfigParams data -> CliBuilder (Result data [NoValue]) {}action GetParamsAction
Param
.
list
: ParameterConfigParams data -> CliBuilder (List data) {}action StopCollectingAction
Param
.
arg
: DefaultableParameterConfigBaseParams Arg -> CliBuilder Arg {}action GetParamsAction
Param
.
maybe_arg
: ParameterConfigBaseParams -> CliBuilder ArgValue {}action GetParamsAction
Param
.
arg_list
: ParameterConfigBaseParams -> CliBuilder (List Arg) {}action StopCollectingAction
Param
.
bytes
: DefaultableParameterConfigBaseParams (List U8) -> CliBuilder (List U8) {}action GetParamsAction
Param
.
maybe_bytes
: ParameterConfigBaseParams -> CliBuilder (Result (List U8) [NoValue]) {}action GetParamsAction
Param
.
bytes_list
: ParameterConfigBaseParams -> CliBuilder (List (List U8)) {}action StopCollectingAction
Param
.
str
: DefaultableParameterConfigBaseParams Str -> CliBuilder Str {}action GetParamsAction
Param
.
maybe_str
: ParameterConfigBaseParams -> CliBuilder (Result Str [NoValue]) {}action GetParamsAction
Param
.
str_list
: ParameterConfigBaseParams -> CliBuilder (List Str) {}action StopCollectingAction
Param
.
dec
: DefaultableParameterConfigBaseParams Dec -> CliBuilder Dec {}action GetParamsAction
Param
.
maybe_dec
: ParameterConfigBaseParams -> CliBuilder (Result Dec [NoValue]) {}action GetParamsAction
Param
.
dec_list
: ParameterConfigBaseParams -> CliBuilder (List Dec) {}action StopCollectingAction
Param
.
f32
: DefaultableParameterConfigBaseParams F32 -> CliBuilder F32 {}action GetParamsAction
Param
.
maybe_f32
: ParameterConfigBaseParams -> CliBuilder (Result F32 [NoValue]) {}action GetParamsAction
Param
.
f32_list
: ParameterConfigBaseParams -> CliBuilder (List F32) {}action StopCollectingAction
Param
.
f64
: DefaultableParameterConfigBaseParams F64 -> CliBuilder F64 {}action GetParamsAction
Param
.
maybe_f64
: ParameterConfigBaseParams -> CliBuilder (Result F64 [NoValue]) {}action GetParamsAction
Param
.
f64_list
: ParameterConfigBaseParams -> CliBuilder (List F64) {}action StopCollectingAction
Param
.
u8
: DefaultableParameterConfigBaseParams U8 -> CliBuilder U8 {}action GetParamsAction
Param
.
maybe_u8
: ParameterConfigBaseParams -> CliBuilder (Result U8 [NoValue]) {}action GetParamsAction
Param
.
u8_list
: ParameterConfigBaseParams -> CliBuilder (List U8) {}action StopCollectingAction
Param
.
u16
: DefaultableParameterConfigBaseParams U16 -> CliBuilder U16 {}action GetParamsAction
Param
.
maybe_u16
: ParameterConfigBaseParams -> CliBuilder (Result U16 [NoValue]) {}action GetParamsAction
Param
.
u16_list
: ParameterConfigBaseParams -> CliBuilder (List U16) {}action StopCollectingAction
Param
.
u32
: DefaultableParameterConfigBaseParams U32 -> CliBuilder U32 {}action GetParamsAction
Param
.
maybe_u32
: ParameterConfigBaseParams -> CliBuilder (Result U32 [NoValue]) {}action GetParamsAction
Param
.
u32_list
: ParameterConfigBaseParams -> CliBuilder (List U32) {}action StopCollectingAction
Param
.
u64
: DefaultableParameterConfigBaseParams U64 -> CliBuilder U64 {}action GetParamsAction
Param
.
maybe_u64
: ParameterConfigBaseParams -> CliBuilder (Result U64 [NoValue]) {}action GetParamsAction
Param
.
u64_list
: ParameterConfigBaseParams -> CliBuilder (List U64) {}action StopCollectingAction
Param
.
u128
: DefaultableParameterConfigBaseParams U128 -> CliBuilder U128 {}action GetParamsAction
Param
.
maybe_u128
: ParameterConfigBaseParams -> CliBuilder (Result U128 [NoValue]) {}action GetParamsAction
Param
.
u128_list
: ParameterConfigBaseParams -> CliBuilder (List U128) {}action StopCollectingAction
Param
.
i8
: DefaultableParameterConfigBaseParams I8 -> CliBuilder I8 {}action GetParamsAction
Param
.
maybe_i8
: ParameterConfigBaseParams -> CliBuilder (Result I8 [NoValue]) {}action GetParamsAction
Param
.
i8_list
: ParameterConfigBaseParams -> CliBuilder (List I8) {}action StopCollectingAction
Param
.
i16
: DefaultableParameterConfigBaseParams I16 -> CliBuilder I16 {}action GetParamsAction
Param
.
maybe_i16
: ParameterConfigBaseParams -> CliBuilder (Result I16 [NoValue]) {}action GetParamsAction
Param
.
i16_list
: ParameterConfigBaseParams -> CliBuilder (List I16) {}action StopCollectingAction
Param
.
i32
: DefaultableParameterConfigBaseParams I32 -> CliBuilder I32 {}action GetParamsAction
Param
.
maybe_i32
: ParameterConfigBaseParams -> CliBuilder (Result I32 [NoValue]) {}action GetParamsAction
Param
.
i32_list
: ParameterConfigBaseParams -> CliBuilder (List I32) {}action StopCollectingAction
Param
.
i64
: DefaultableParameterConfigBaseParams I64 -> CliBuilder I64 {}action GetParamsAction
Param
.
maybe_i64
: ParameterConfigBaseParams -> CliBuilder (Result I64 [NoValue]) {}action GetParamsAction
Param
.
i64_list
: ParameterConfigBaseParams -> CliBuilder (List I64) {}action StopCollectingAction
Param
.
i128
: DefaultableParameterConfigBaseParams I128 -> CliBuilder I128 {}action GetParamsAction
Param
.
maybe_i128
: ParameterConfigBaseParams -> CliBuilder (Result I128 [NoValue]) {}action GetParamsAction
Param
.
i128_list
: ParameterConfigBaseParams -> CliBuilder (List I128) {}action StopCollectingAction
SubCmd
.
SubcommandParserConfig
SubCmd
.
finish
: CliBuilder state fromAction toAction, { name : Str, description ? Str, mapper : state -> commonState } -> { name : Str, parser : ArgParser commonState, config : SubcommandConfig }
SubCmd
.
optional
: List (SubcommandParserConfig sub_state) -> CliBuilder (Result sub_state [NoSubcommand]) GetOptionsAction GetParamsAction
SubCmd
.
required
: List (SubcommandParserConfig sub_data) -> CliBuilder sub_data GetOptionsAction GetParamsAction
Validate
.
CliValidationErr
Validate
.
validate_cli
: CliConfig -> Result {} CliValidationErr
Exposed Modules
LLM docs
Opt
Base
Cli
ErrorFormatter
Help
Param
SubCmd
Validate