optparse_applicative

Members list

Type members

Inherited classlikes

trait ArgsState[F[_]]

Attributes

Inherited from:
Common (hidden)
Supertypes
class Object
trait Matchable
class Any

Types

type Parser[A] = Parser[A]
type ParserInfo[A] = ParserInfo[A]

Inherited types

type InfoMod[A] = Endo[ParserInfo[A]]

Attributes

Inherited from:
Builder (hidden)
type PrefsMod = Endo[ParserPrefs]

Attributes

Inherited from:
Builder (hidden)

Value members

Inherited methods

def abortOption[A](err: ParseError, mod: Mod[OptionFields, A => A]*): Parser[A => A]

An option that always fails.

An option that always fails.

Attributes

Inherited from:
Builder (hidden)
def argMatches[F[_], A](opt: OptReader[A], arg: String)(implicit F: MonadP[F]): Option[StateT[Args, F, A]]

Attributes

Inherited from:
Common (hidden)
def argument[A](p: ReadM[A], mod: Mod[ArgumentFields, A]*): Parser[A]

Builder for an argument parser.

Builder for an argument parser.

Attributes

Inherited from:
Builder (hidden)
def bigDecimalArgument(mod: Mod[ArgumentFields, BigDecimal]*): Parser[BigDecimal]

Builder for a BigDecimal argument.

Builder for a BigDecimal argument.

Attributes

Inherited from:
Builder (hidden)
def bigDecimalOption(mod: Mod[OptionFields, BigDecimal]*): Parser[BigDecimal]

Builder for an option taking a BigDecimal argument.

Builder for an option taking a BigDecimal argument.

Attributes

Inherited from:
Builder (hidden)
def bigIntArgument(mod: Mod[ArgumentFields, BigInt]*): Parser[BigInt]

Builder for a BigInt argument.

Builder for a BigInt argument.

Attributes

Inherited from:
Builder (hidden)
def bigIntOption(mod: Mod[OptionFields, BigInt]*): Parser[BigInt]

Builder for an option taking a BigInt argument.

Builder for an option taking a BigInt argument.

Attributes

Inherited from:
Builder (hidden)
def bodyHelp(chunk: Chunk[Doc]): ParserHelp

Attributes

Inherited from:
Help (hidden)
def briefDesc[A](pprefs: ParserPrefs, parser: Parser[A]): Chunk[Doc]

Generate a brief help text for a parser.

Generate a brief help text for a parser.

Attributes

Inherited from:
Help (hidden)
def byteArgument(mod: Mod[ArgumentFields, Byte]*): Parser[Byte]

Builder for a Byte argument.

Builder for a Byte argument.

Attributes

Inherited from:
Builder (hidden)
def byteOption(mod: Mod[OptionFields, Byte]*): Parser[Byte]

Builder for an option taking a Byte argument.

Builder for an option taking a Byte argument.

Attributes

Inherited from:
Builder (hidden)
def charArgument(mod: Mod[ArgumentFields, Char]*): Parser[Char]

Builder for a Char argument.

Builder for a Char argument.

Attributes

Inherited from:
Builder (hidden)
def charOption(mod: Mod[OptionFields, Char]*): Parser[Char]

Builder for an option taking a Char argument.

Builder for an option taking a Char argument.

Attributes

Inherited from:
Builder (hidden)
def cmdDesc[A](p: Parser[A]): Chunk[Doc]

Generate descriptions for commands.

Generate descriptions for commands.

Attributes

Inherited from:
Help (hidden)
def columns(cols: Int): PrefsMod

Attributes

Inherited from:
Builder (hidden)
def command[A](cmd: String, info: ParserInfo[A]): Mod[CommandFields, A]

Add a command to a subparser option.

Add a command to a subparser option.

Attributes

Inherited from:
Builder (hidden)
def customExecParser[A](args: List[String], progName: String, pprefs: ParserPrefs, pinfo: ParserInfo[A]): A

Attributes

Inherited from:
Extra (hidden)
def disabled[A]: ReadM[A]

Null Option reader. All arguments will fail validation.

Null Option reader. All arguments will fail validation.

Attributes

Inherited from:
Builder (hidden)
def doubleArgument(mod: Mod[ArgumentFields, Double]*): Parser[Double]

Builder for a Double argument.

Builder for a Double argument.

Attributes

Inherited from:
Builder (hidden)
def doubleOption(mod: Mod[OptionFields, Double]*): Parser[Double]

Builder for an option taking a Double argument.

Builder for an option taking a Double argument.

Attributes

Inherited from:
Builder (hidden)
def eitherReader[A](f: String => String \/ A): ReadM[A]

Convert a function in the Either monad to a reader.

Convert a function in the Either monad to a reader.

Attributes

Inherited from:
Builder (hidden)
def errorHelp(chunk: Chunk[Doc]): ParserHelp

Attributes

Inherited from:
Help (hidden)
def evalParser[A](p: Parser[A]): Option[A]

The default value of a Parser. This function returns an error if any of the options don't have a default value

The default value of a Parser. This function returns an error if any of the options don't have a default value

Attributes

Inherited from:
Common (hidden)
def execParser[A](args: Array[String], progName: String, pinfo: ParserInfo[A]): A

Attributes

Inherited from:
Extra (hidden)
def execParserPure[A](pprefs: ParserPrefs, pinfo: ParserInfo[A], args: List[String]): ParserResult[A]

Attributes

Inherited from:
Extra (hidden)
def failureCode[A](code: Int): InfoMod[A]

Attributes

Inherited from:
Builder (hidden)
def flag[A](defV: A, actV: A, mod: Mod[FlagFields, A]*): Parser[A]

Builder for a flag parser.

Builder for a flag parser.

Attributes

Inherited from:
Builder (hidden)
def flag_[A](actV: A, mod: Mod[FlagFields, A]*): Parser[A]

Builder for a flag parser without a default value.

Builder for a flag parser without a default value.

Attributes

Inherited from:
Builder (hidden)
def floatArgument(mod: Mod[ArgumentFields, Float]*): Parser[Float]

Builder for a Float argument.

Builder for a Float argument.

Attributes

Inherited from:
Builder (hidden)
def floatOption(mod: Mod[OptionFields, Float]*): Parser[Float]

Builder for an option taking a Float argument.

Builder for an option taking a Float argument.

Attributes

Inherited from:
Builder (hidden)
def footerDoc[A](doc: Option[Doc]): InfoMod[A]

Attributes

Inherited from:
Builder (hidden)
def footerHelp(chunk: Chunk[Doc]): ParserHelp

Attributes

Inherited from:
Help (hidden)
def fromTryCatch[A](f: String => A): ReadM[A]

Turns an unsafe conversion function into a reader by catching non-fatal exceptions.

Turns an unsafe conversion function into a reader by catching non-fatal exceptions.

Attributes

Inherited from:
Builder (hidden)
def fullDesc[A](pprefs: ParserPrefs, parser: Parser[A]): Chunk[Doc]

Generate a full help text for a parser.

Generate a full help text for a parser.

Attributes

Inherited from:
Help (hidden)
def getPolicy[A](i: ParserInfo[A]): ArgPolicy

Attributes

Inherited from:
Common (hidden)
def handleParseResult[A](progName: String, result: ParserResult[A]): A

Attributes

Inherited from:
Extra (hidden)
def header[A](header: String): InfoMod[A]

Attributes

Inherited from:
Builder (hidden)
def headerDoc[A](doc: Option[Doc]): InfoMod[A]

Attributes

Inherited from:
Builder (hidden)
def headerHelp(chunk: Chunk[Doc]): ParserHelp

Attributes

Inherited from:
Help (hidden)
def help[F[_], A](s: String): Mod[F, A]

Specify the help text for an option.

Specify the help text for an option.

Attributes

Inherited from:
Builder (hidden)
def helpDoc[F[_], A](doc: Option[Doc]): Mod[F, A]

Specify the help Doc.

Specify the help Doc.

Attributes

Inherited from:
Builder (hidden)
def helper[A]: Parser[A => A]

A hidden "helper" option which always fails

A hidden "helper" option which always fails

Attributes

Inherited from:
Extra (hidden)
def hidden[F[_], A]: Mod[F, A]

Hide this option from the brief description.

Hide this option from the brief description.

Attributes

Inherited from:
Builder (hidden)
def idm[M](implicit M: Monoid[M]): M

Trivial option modifier.

Trivial option modifier.

Attributes

Inherited from:
Builder (hidden)
def info[A](parser: Parser[A], mod: InfoMod[A]*): ParserInfo[A]

Attributes

Inherited from:
Builder (hidden)
def infoOption[A](s: String, mod: Mod[OptionFields, A => A]*): Parser[A => A]

An option that always fails and displays a message.

An option that always fails and displays a message.

Attributes

Inherited from:
Builder (hidden)
def intArgument(mod: Mod[ArgumentFields, Int]*): Parser[Int]

Builder for a Int argument.

Builder for a Int argument.

Attributes

Inherited from:
Builder (hidden)
def intOption(mod: Mod[OptionFields, Int]*): Parser[Int]

Builder for an option taking a Int argument.

Builder for an option taking a Int argument.

Attributes

Inherited from:
Builder (hidden)
def isArg[A](r: OptReader[A]): Boolean

Attributes

Inherited from:
Common (hidden)
def isOptionPrefix(n1: OptName, n2: OptName): Boolean

Attributes

Inherited from:
Common (hidden)
def liftOpt[A](opt: Opt[A]): Parser[A]

Create a parser composed of a single operation.

Create a parser composed of a single operation.

Attributes

Inherited from:
Common (hidden)
def long[F[_], A](s: String)(implicit F: HasName[F]): Mod[F, A]

Specify a long name for an option.

Specify a long name for an option.

Attributes

Inherited from:
Builder (hidden)
def longArgument(mod: Mod[ArgumentFields, Long]*): Parser[Long]

Builder for a Long argument.

Builder for a Long argument.

Attributes

Inherited from:
Builder (hidden)
def longOption(mod: Mod[OptionFields, Long]*): Parser[Long]

Builder for an option taking a Long argument.

Builder for an option taking a Long argument.

Attributes

Inherited from:
Builder (hidden)
def many[A](p: Parser[A]): Parser[List[A]]

Attributes

Inherited from:
ParserFunctions (hidden)
def mapParser[A, B](f: OptHelpInfo => NaturalTransformation[Opt, [_] =>> Const[B, _$23]], p: Parser[A]): List[B]

Map a polymorphic function over all the options of a parser, and collect the results in a list.

Map a polymorphic function over all the options of a parser, and collect the results in a list.

Attributes

Inherited from:
Common (hidden)
def metavar[F[_], A](v: String): Mod[F, A]

Specify a metavariable for the argument.

Specify a metavariable for the argument.

Metavariables have no effect on the parser, and only serve to specify the symbolic name for an argument to be displayed in the help text.

Attributes

Inherited from:
Builder (hidden)
def multiSuffix(suffix: String): PrefsMod

Attributes

Inherited from:
Builder (hidden)

Specify the error to display when no argument is provided to this option.

Specify the error to display when no argument is provided to this option.

Attributes

Inherited from:
Builder (hidden)
def noIntersperse[A]: InfoMod[A]

Attributes

Inherited from:
Builder (hidden)
def optDesc[A](pprefs: ParserPrefs, style: OptDescStyle, info: OptHelpInfo, opt: Opt[A]): Chunk[Doc]

Generate description for a single option.

Generate description for a single option.

Attributes

Inherited from:
Help (hidden)
def optMatches[F[_], A](disambiguate: Boolean, opt: OptReader[A], word: OptWord)(implicit F: MonadP[F]): Option[StateT[Args, F, A]]

Attributes

Inherited from:
Common (hidden)
def option[A](r: ReadM[A], mod: Mod[OptionFields, A]*): Parser[A]

Attributes

Inherited from:
Builder (hidden)
def optional[A](p: Parser[A]): Parser[Option[A]]

Attributes

Inherited from:
ParserFunctions (hidden)
def parseError[F[_], A](arg: String)(implicit F: MonadP[F]): F[A]

Attributes

Inherited from:
Common (hidden)
def parseWord(s: String): Option[OptWord]

Attributes

Inherited from:
Common (hidden)

Generate a ParserFailure from a ParseError in a given Context.

Generate a ParserFailure from a ParseError in a given Context.

Attributes

Inherited from:
Extra (hidden)
def parserHelp[A](pprefs: ParserPrefs, parser: Parser[A]): ParserHelp

Generate the help text for a program.

Generate the help text for a program.

Attributes

Inherited from:
Help (hidden)
def parserUsage[A](pprefs: ParserPrefs, parser: Parser[A], progName: String): Doc

Generate option summary.

Generate option summary.

Attributes

Inherited from:
Help (hidden)
def prefs(mod: PrefsMod*): ParserPrefs

Attributes

Inherited from:
Builder (hidden)
def progDesc[A](desc: String): InfoMod[A]

Specify a short program description.

Specify a short program description.

Attributes

Inherited from:
Builder (hidden)
def progDescDoc[A](doc: Option[Doc]): InfoMod[A]

Attributes

Inherited from:
Builder (hidden)
def pure[A](a: A): Parser[A]

Attributes

Inherited from:
ParserFunctions (hidden)
def renderFailure(failure: ParserFailure[ParserHelp], progName: String): (String, ExitCode)

Attributes

Inherited from:
Extra (hidden)
def runParser[F[_], A](policy: ArgPolicy, p: Parser[A], args: Args)(implicit F: MonadP[F]): F[(Args, A)]

Apply a Parser to a command line, and return a result and leftover arguments. This function returns an error if any parsing error occurs, or if any options are missing and don't have a default value.

Apply a Parser to a command line, and return a result and leftover arguments. This function returns an error if any parsing error occurs, or if any options are missing and don't have a default value.

Attributes

Inherited from:
Common (hidden)
def runParserFully[F[_] : MonadP, A](policy: ArgPolicy, p: Parser[A], args: Args): F[A]

Attributes

Inherited from:
Common (hidden)
def runParserInfo[F[_] : MonadP, A](i: ParserInfo[A], args: Args): F[A]

Attributes

Inherited from:
Common (hidden)
def searchArg[F[_] : MonadP, A](arg: String, p: Parser[A]): NondetT[ArgsState[F]#G, Parser[A]]

Attributes

Inherited from:
Common (hidden)
def searchOpt[F[_] : MonadP, A](pprefs: ParserPrefs, w: OptWord, p: Parser[A]): NondetT[ArgsState[F]#G, Parser[A]]

Attributes

Inherited from:
Common (hidden)
def searchParser[F[_] : Monad, A](f: NaturalTransformation[Opt, [_] =>> NondetT[F, _$17]], p: Parser[A]): NondetT[F, Parser[A]]

Attributes

Inherited from:
Common (hidden)
def short[F[_], A](c: Char)(implicit F: HasName[F]): Mod[F, A]

Specify a short name for an option.

Specify a short name for an option.

Attributes

Inherited from:
Builder (hidden)
def shortArgument(mod: Mod[ArgumentFields, Short]*): Parser[Short]

Builder for a Short argument.

Builder for a Short argument.

Attributes

Inherited from:
Builder (hidden)
def shortOption(mod: Mod[OptionFields, Short]*): Parser[Short]

Builder for an option taking a Short argument.

Builder for an option taking a Short argument.

Attributes

Inherited from:
Builder (hidden)
def showDefault[F[_], A](implicit A: Show[A]): Mod[F, A]

Show the default value for this option using its Show instance.

Show the default value for this option using its Show instance.

Attributes

Inherited from:
Builder (hidden)
def showDefaultWith[F[_], A](f: A => String): Mod[F, A]

Specify a function to show the default value for an option.

Specify a function to show the default value for an option.

Attributes

Inherited from:
Builder (hidden)
def showOption(name: OptName): String

Attributes

Inherited from:
Common (hidden)
def simplify[A](as: OptTree[A]): OptTree[A]

Attributes

Inherited from:
Common (hidden)
def some[A](p: Parser[A]): Parser[NonEmptyList[A]]

Attributes

Inherited from:
ParserFunctions (hidden)
def stepParser[F[_] : MonadP, A](pprefs: ParserPrefs, policy: ArgPolicy, arg: String, p: Parser[A]): NondetT[ArgsState[F]#G, Parser[A]]

Attributes

Inherited from:
Common (hidden)
def strArgument(mod: Mod[ArgumentFields, String]*): Parser[String]

Builder for a String argument.

Builder for a String argument.

Attributes

Inherited from:
Builder (hidden)
def strOption(mod: Mod[OptionFields, String]*): Parser[String]

Builder for an option taking a String argument.

Builder for an option taking a String argument.

Attributes

Inherited from:
Builder (hidden)
def subparser[A](mod: Mod[CommandFields, A]*): Parser[A]

Builder for a command parser. The command modifier can be used to specify individual commands.

Builder for a command parser. The command modifier can be used to specify individual commands.

Attributes

Inherited from:
Builder (hidden)
def switch(mod: Mod[FlagFields, Boolean]*): Parser[Boolean]

Builder for a boolean flag.

Builder for a boolean flag.

Attributes

Inherited from:
Builder (hidden)
def treeMapParser[A, B](g: OptHelpInfo => NaturalTransformation[Opt, [_] =>> Const[B, _$24]], p: Parser[A]): OptTree[B]

Like mapParser, but collect the results in a tree structure.

Like mapParser, but collect the results in a tree structure.

Attributes

Inherited from:
Common (hidden)
def usageHelp(chunk: Chunk[Doc]): ParserHelp

Attributes

Inherited from:
Help (hidden)
def value[F[_], A](a: A): Mod[F, A]

Specify a default value for an option.

Specify a default value for an option.

Attributes

Inherited from:
Builder (hidden)

Inherited fields

val disambiguate: PrefsMod

Attributes

Inherited from:
Builder (hidden)
val noBacktrack: PrefsMod

Attributes

Inherited from:
Builder (hidden)
val readBigDecimal: ReadM[BigDecimal]

BigDecimal reader

BigDecimal reader

Attributes

Inherited from:
Builder (hidden)
val readBigInt: ReadM[BigInt]

BigInt reader

BigInt reader

Attributes

Inherited from:
Builder (hidden)
val readByte: ReadM[Byte]

Byte reader

Byte reader

Attributes

Inherited from:
Builder (hidden)
val readChar: ReadM[Char]

Char reader

Char reader

Attributes

Inherited from:
Builder (hidden)
val readDouble: ReadM[Double]

Double reader

Double reader

Attributes

Inherited from:
Builder (hidden)
val readFloat: ReadM[Float]

Float reader

Float reader

Attributes

Inherited from:
Builder (hidden)
val readInt: ReadM[Int]

Int reader.

Int reader.

Attributes

Inherited from:
Builder (hidden)
val readLong: ReadM[Long]

Long reader

Long reader

Attributes

Inherited from:
Builder (hidden)
val readShort: ReadM[Short]

Short reader

Short reader

Attributes

Inherited from:
Builder (hidden)
val readStr: ReadM[String]

String reader.

String reader.

Attributes

Inherited from:
Builder (hidden)
val showHelpOnError: PrefsMod

Attributes

Inherited from:
Builder (hidden)