package climate

  1. Overview
  2. Docs
type 'a parser := 'a t
type 'a t
type command_line = {
  1. program : string;
  2. subcommand : string list;
  3. args : string list;
}
val file : _ t

Complete using paths relative to the current directory. This can be used with convs of any type though care must be taken that the conv knows how to parse paths. This requirement isn't enforced with types as it would be too restrictive to be useful in general.

val values : 'a list -> 'a t
val reentrant : (command_line -> 'a list) -> 'a t
val reentrant_parse : 'a list parser -> 'a t
val reentrant_thunk : (unit -> 'a list) -> 'a t
val some : 'a t -> 'a option t

For use in cases the optionality of a value being parsed/completed needs to represented in the value itself.

val stringify : 'a t -> 'a print -> _ t

Flatten the completion information into plain strings. This can be used to supply completion hints that otherwise wouldn't satisfy the type constraints within a conv, though care must be taken to ensure that the conv knows how to parse the suggestions as this will no longer be enforced by the type system when this function is used.

OCaml

Innovation. Community. Security.