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

Safe Haskell | Safe-Inferred
Language | Haskell98

Options.Applicative.Internal

# Documentation

data P a Source #

#### Instances

Instances details

Alternative P Source # |
Instance details Defined in Options.Applicative.Internal Methods empty :: P a Source # (<|>) :: P a -> P a -> P a Source # some :: P a -> P [a] Source # many :: P a -> P [a] Source #
Applicative P Source # |
Instance details Defined in Options.Applicative.Internal Methods pure :: a -> P a Source # (<*>) :: P (a -> b) -> P a -> P b Source # liftA2 :: (a -> b -> c) -> P a -> P b -> P c Source # (*>) :: P a -> P b -> P b Source # (<*) :: P a -> P b -> P a Source #
Functor P Source # |
Instance details Defined in Options.Applicative.Internal Methods fmap :: (a -> b) -> P a -> P b Source # (<$) :: a -> P b -> P a Source #
Monad P Source # |
Instance details Defined in Options.Applicative.Internal Methods (>>=) :: P a -> (a -> P b) -> P b Source # (>>) :: P a -> P b -> P b Source # return :: a -> P a Source #
MonadPlus P Source # |
Instance details Defined in Options.Applicative.Internal Methods mzero :: P a Source # mplus :: P a -> P a -> P a Source #
MonadP P Source # |
Instance details Defined in Options.Applicative.Internal Methods enterContext :: String -> ParserInfo a -> P () Source # exitContext :: P () Source # getPrefs :: P ParserPrefs Source # missingArgP :: ParseError -> Completer -> P a Source # errorP :: ParseError -> P a Source # exitP :: IsCmdStart -> ArgPolicy -> Parser b -> Maybe a -> P a Source #

class (Alternative m, MonadPlus m) => MonadP (m :: Type -> Type) where Source #

Methods

enterContext :: String -> ParserInfo a -> m () Source #

exitContext :: m () Source #

getPrefs :: m ParserPrefs Source #

missingArgP :: ParseError -> Completer -> m a Source #

errorP :: ParseError -> m a Source #

exitP :: IsCmdStart -> ArgPolicy -> Parser b -> Maybe a -> m a Source #

#### Instances

Instances details

MonadP Completion Source # |

Instance details

Defined in Options.Applicative.Internal

Methods

enterContext :: String -> ParserInfo a -> Completion () Source #

exitContext :: Completion () Source #

getPrefs :: Completion ParserPrefs Source #

missingArgP :: ParseError -> Completer -> Completion a Source #

errorP :: ParseError -> Completion a Source #

exitP :: IsCmdStart -> ArgPolicy -> Parser b -> Maybe a -> Completion a Source #

MonadP P Source # |
Instance details Defined in Options.Applicative.Internal Methods enterContext :: String -> ParserInfo a -> P () Source # exitContext :: P () Source # getPrefs :: P ParserPrefs Source # missingArgP :: ParseError -> Completer -> P a Source # errorP :: ParseError -> P a Source # exitP :: IsCmdStart -> ArgPolicy -> Parser b -> Maybe a -> P a Source #

data ParseError Source #

Constructors

ErrorMsg String |
InfoMsg String |
ShowHelpText (Maybe String) |
UnknownError |
MissingError IsCmdStart SomeParser |
ExpectsArgError String |
UnexpectedError String SomeParser |

#### Instances

Instances details

Monoid ParseError Source # |
Instance details Defined in Options.Applicative.Types Methods mempty :: ParseError Source # mappend :: ParseError -> ParseError -> ParseError Source # mconcat :: [ParseError] -> ParseError Source #
Semigroup ParseError Source # |
Instance details Defined in Options.Applicative.Types Methods (<>) :: ParseError -> ParseError -> ParseError Source # sconcat :: NonEmpty ParseError -> ParseError Source # stimes :: Integral b => b -> ParseError -> ParseError Source #

uncons :: [a] -> Maybe (a, [a]) Source #

hoistMaybe :: MonadPlus m => Maybe a -> m a Source #

hoistEither :: MonadP m => Either ParseError a -> m a Source #

runReadM :: MonadP m => ReadM a -> String -> m a Source #

withReadM :: (String -> String) -> ReadM a -> ReadM a Source #

runP :: P a -> ParserPrefs -> (Either ParseError a, [Context]) Source #

data Completion a Source #

#### Instances

Instances details

Alternative Completion Source # |
Instance details Defined in Options.Applicative.Internal Methods empty :: Completion a Source # (<|>) :: Completion a -> Completion a -> Completion a Source # some :: Completion a -> Completion [a] Source # many :: Completion a -> Completion [a] Source #
Applicative Completion Source # |
Instance details Defined in Options.Applicative.Internal Methods pure :: a -> Completion a Source # (<*>) :: Completion (a -> b) -> Completion a -> Completion b Source # liftA2 :: (a -> b -> c) -> Completion a -> Completion b -> Completion c Source # (*>) :: Completion a -> Completion b -> Completion b Source # (<*) :: Completion a -> Completion b -> Completion a Source #
Functor Completion Source # |
Instance details Defined in Options.Applicative.Internal Methods fmap :: (a -> b) -> Completion a -> Completion b Source # (<$) :: a -> Completion b -> Completion a Source #
Monad Completion Source # |
Instance details Defined in Options.Applicative.Internal Methods (>>=) :: Completion a -> (a -> Completion b) -> Completion b Source # (>>) :: Completion a -> Completion b -> Completion b Source # return :: a -> Completion a Source #
MonadPlus Completion Source # |
Instance details Defined in Options.Applicative.Internal Methods mzero :: Completion a Source # mplus :: Completion a -> Completion a -> Completion a Source #
MonadP Completion Source # |

Instance details

Defined in Options.Applicative.Internal

Methods

enterContext :: String -> ParserInfo a -> Completion () Source #

exitContext :: Completion () Source #

getPrefs :: Completion ParserPrefs Source #

missingArgP :: ParseError -> Completer -> Completion a Source #

errorP :: ParseError -> Completion a Source #

exitP :: IsCmdStart -> ArgPolicy -> Parser b -> Maybe a -> Completion a Source #

runCompletion :: Completion r -> ParserPrefs -> Maybe (Either (SomeParser, ArgPolicy) Completer) Source #

contextNames :: [Context] -> [String] Source #

data ListT (m :: Type -> Type) a Source #

#### Instances

Instances details

MonadTrans ListT Source # |
Instance details Defined in Options.Applicative.Internal Methods lift :: Monad m => m a -> ListT m a Source #
Monad m => Alternative (ListT m) Source # |
Instance details Defined in Options.Applicative.Internal Methods empty :: ListT m a Source # (<|>) :: ListT m a -> ListT m a -> ListT m a Source # some :: ListT m a -> ListT m [a] Source # many :: ListT m a -> ListT m [a] Source #
Monad m => Applicative (ListT m) Source # |
Instance details Defined in Options.Applicative.Internal Methods pure :: a -> ListT m a Source # (<*>) :: ListT m (a -> b) -> ListT m a -> ListT m b Source # liftA2 :: (a -> b -> c) -> ListT m a -> ListT m b -> ListT m c Source # (*>) :: ListT m a -> ListT m b -> ListT m b Source # (<*) :: ListT m a -> ListT m b -> ListT m a Source #
Monad m => Functor (ListT m) Source # |
Instance details Defined in Options.Applicative.Internal Methods fmap :: (a -> b) -> ListT m a -> ListT m b Source # (<$) :: a -> ListT m b -> ListT m a Source #
Monad m => Monad (ListT m) Source # |
Instance details Defined in Options.Applicative.Internal Methods (>>=) :: ListT m a -> (a -> ListT m b) -> ListT m b Source # (>>) :: ListT m a -> ListT m b -> ListT m b Source # return :: a -> ListT m a Source #
Monad m => MonadPlus (ListT m) Source # |
Instance details Defined in Options.Applicative.Internal Methods mzero :: ListT m a Source # mplus :: ListT m a -> ListT m a -> ListT m a Source #

takeListT :: forall (m :: Type -> Type) a. Monad m => Int -> ListT m a -> ListT m a Source #

runListT :: Monad m => ListT m a -> m [a] Source #

hoistList :: Alternative m => [a] -> m a Source #

data NondetT (m :: Type -> Type) a Source #

#### Instances

Instances details

MonadTrans NondetT Source # |
Instance details Defined in Options.Applicative.Internal Methods lift :: Monad m => m a -> NondetT m a Source #
Monad m => Alternative (NondetT m) Source # |
Instance details Defined in Options.Applicative.Internal Methods empty :: NondetT m a Source # (<|>) :: NondetT m a -> NondetT m a -> NondetT m a Source # some :: NondetT m a -> NondetT m [a] Source # many :: NondetT m a -> NondetT m [a] Source #
Monad m => Applicative (NondetT m) Source # |
Instance details Defined in Options.Applicative.Internal Methods pure :: a -> NondetT m a Source # (<*>) :: NondetT m (a -> b) -> NondetT m a -> NondetT m b Source # liftA2 :: (a -> b -> c) -> NondetT m a -> NondetT m b -> NondetT m c Source # (*>) :: NondetT m a -> NondetT m b -> NondetT m b Source # (<*) :: NondetT m a -> NondetT m b -> NondetT m a Source #
Monad m => Functor (NondetT m) Source # |
Instance details Defined in Options.Applicative.Internal Methods fmap :: (a -> b) -> NondetT m a -> NondetT m b Source # (<$) :: a -> NondetT m b -> NondetT m a Source #
Monad m => Monad (NondetT m) Source # |
Instance details Defined in Options.Applicative.Internal Methods (>>=) :: NondetT m a -> (a -> NondetT m b) -> NondetT m b Source # (>>) :: NondetT m a -> NondetT m b -> NondetT m b Source # return :: a -> NondetT m a Source #
Monad m => MonadPlus (NondetT m) Source # |
Instance details Defined in Options.Applicative.Internal Methods mzero :: NondetT m a Source # mplus :: NondetT m a -> NondetT m a -> NondetT m a Source #

cut :: forall (m :: Type -> Type). Monad m => NondetT m () Source #

(<!>) :: forall (m :: Type -> Type) a. Monad m => NondetT m a -> NondetT m a -> NondetT m a Source #

disamb :: Monad m => Bool -> NondetT m a -> m (Maybe a) Source #