flix

0.77.0

ArgDescr

enum ArgDescr[a: Type]Source
case NoArg(a)case ReqArg(String -> Option[a], String)case OptArg(Option[String] -> Option[a], String)

Type of option argument descriptors.

Defines whether or not an option takes an argument.

  • NoArg expects no argument. The constructor takes a value of type a indicating the option that has been recognized.
  • ReqArg mandates an argument. The constructor takes a function to decode the argument and description string.
  • OptArg optionally requires an argument. The constructor takes a function to decode the argument and description string.

The "decode" functions are expected to produce Some(_) when decoding is successful, and None to indicate failure.