flix

0.55.0

GetOpt.ArgDescr

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

ArgDescr defines whether or not the 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.