Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
Options.Applicative.Internal
Synopsis
- data P a
- class (Alternative m, MonadPlus m) => MonadP (m :: Type -> Type) where
- enterContext :: String -> ParserInfo a -> m ()
- exitContext :: m ()
- getPrefs :: m ParserPrefs
- missingArgP :: ParseError -> Completer -> m a
- errorP :: ParseError -> m a
- exitP :: IsCmdStart -> ArgPolicy -> Parser b -> Maybe a -> m a
- data ParseError
- uncons :: [a] -> Maybe (a, [a])
- hoistMaybe :: MonadPlus m => Maybe a -> m a
- hoistEither :: MonadP m => Either ParseError a -> m a
- runReadM :: MonadP m => ReadM a -> String -> m a
- withReadM :: (String -> String) -> ReadM a -> ReadM a
- runP :: P a -> ParserPrefs -> (Either ParseError a, [Context])
- data Completion a
- runCompletion :: Completion r -> ParserPrefs -> Maybe (Either (SomeParser, ArgPolicy) Completer)
- contextNames :: [Context] -> [String]
- data ListT (m :: Type -> Type) a
- takeListT :: forall (m :: Type -> Type) a. Monad m => Int -> ListT m a -> ListT m a
- runListT :: Monad m => ListT m a -> m [a]
- hoistList :: Alternative m => [a] -> m a
- data NondetT (m :: Type -> Type) a
- cut :: forall (m :: Type -> Type). Monad m => NondetT m ()
- (<!>) :: forall (m :: Type -> Type) a. Monad m => NondetT m a -> NondetT m a -> NondetT m a
- disamb :: Monad m => Bool -> NondetT m a -> m (Maybe a)
- mapParserOptions :: (forall x. Option x -> Option x) -> Parser a -> Parser a
Documentation
Instances
Alternative P Source # | |
Applicative P Source # | |
Functor P Source # | |
Monad P Source # | |
MonadPlus P Source # | |
MonadP P Source # | |
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
MonadP Completion Source # | |
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 # | |
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
Monoid ParseError Source # | |
Defined in Options.Applicative.Types Methods mempty :: ParseError # mappend :: ParseError -> ParseError -> ParseError # mconcat :: [ParseError] -> ParseError # | |
Semigroup ParseError Source # | |
Defined in Options.Applicative.Types Methods (<>) :: ParseError -> ParseError -> ParseError # sconcat :: NonEmpty ParseError -> ParseError # stimes :: Integral b => b -> ParseError -> ParseError # |
hoistMaybe :: MonadPlus m => Maybe a -> m a Source #
hoistEither :: MonadP m => Either ParseError a -> m a Source #
runP :: P a -> ParserPrefs -> (Either ParseError a, [Context]) Source #
data Completion a Source #
Instances
runCompletion :: Completion r -> ParserPrefs -> Maybe (Either (SomeParser, ArgPolicy) Completer) Source #
contextNames :: [Context] -> [String] Source #
hoistList :: Alternative m => [a] -> m a Source #
data NondetT (m :: Type -> Type) a Source #
Instances
MonadTrans NondetT Source # | |
Defined in Options.Applicative.Internal | |
Monad m => Alternative (NondetT m) Source # | |
Monad m => Applicative (NondetT m) Source # | |
Defined in Options.Applicative.Internal | |
Monad m => Functor (NondetT m) Source # | |
Monad m => Monad (NondetT m) Source # | |
Monad m => MonadPlus (NondetT m) Source # | |