optparse-applicative-0.6.0: Utilities and combinators for parsing command line options

Safe HaskellSafe-Inferred

Options.Applicative.Builder.Arguments

Synopsis

Documentation

argument :: (String -> Maybe a) -> Mod ArgumentFields a -> Parser aSource

Builder for an argument parser ignoring arguments starting with -.

argument' :: (String -> Maybe a) -> Mod ArgumentFields a -> Parser aSource

Builder for an argument parser.

arguments :: (String -> Maybe a) -> Mod ArgumentFields [a] -> Parser [a]Source

Builder for an argument list parser. All arguments are collected and returned as a list.

Note that arguments starting with - are ignored.

This parser accepts a special argument: --. When a -- is found on the command line, all following arguments are included in the result, even if they start with -.

arguments1 :: (String -> Maybe a) -> Mod ArgumentFields [a] -> Parser [a]Source

Like arguments, but require at least one argument.