Safe Haskell | Safe |
---|---|
Language | Haskell98 |
Documentation
Instances
Monad P # | |
Functor P # | |
Applicative P # | |
Alternative P # | |
MonadPlus P # | |
MonadP P # | |
Defined in Options.Applicative.Internal enterContext :: String -> ParserInfo a -> P () # exitContext :: P () # getPrefs :: P ParserPrefs # missingArgP :: ParseError -> Completer -> P a # errorP :: ParseError -> P a # exitP :: IsCmdStart -> ArgPolicy -> Parser b -> Maybe a -> P a # |
class (Alternative m, MonadPlus m) => MonadP m 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 #
Instances
MonadP Completion # | |
Defined in Options.Applicative.Internal enterContext :: String -> ParserInfo a -> Completion () # exitContext :: Completion () # getPrefs :: Completion ParserPrefs # missingArgP :: ParseError -> Completer -> Completion a # errorP :: ParseError -> Completion a # exitP :: IsCmdStart -> ArgPolicy -> Parser b -> Maybe a -> Completion a # | |
MonadP P # | |
Defined in Options.Applicative.Internal enterContext :: String -> ParserInfo a -> P () # exitContext :: P () # getPrefs :: P ParserPrefs # missingArgP :: ParseError -> Completer -> P a # errorP :: ParseError -> P a # exitP :: IsCmdStart -> ArgPolicy -> Parser b -> Maybe a -> P a # |
data ParseError #
ErrorMsg String | |
InfoMsg String | |
ShowHelpText | |
UnknownError | |
MissingError IsCmdStart SomeParser | |
ExpectsArgError String | |
UnexpectedError String SomeParser |
Instances
Semigroup ParseError # | |
Defined in Options.Applicative.Types (<>) :: ParseError -> ParseError -> ParseError # sconcat :: NonEmpty ParseError -> ParseError # stimes :: Integral b => b -> ParseError -> ParseError # | |
Monoid ParseError # | |
Defined in Options.Applicative.Types mempty :: ParseError # mappend :: ParseError -> ParseError -> ParseError # mconcat :: [ParseError] -> ParseError # |
hoistMaybe :: MonadPlus m => Maybe a -> m a #
hoistEither :: MonadP m => Either ParseError a -> m a #
runP :: P a -> ParserPrefs -> (Either ParseError a, [Context]) #
data Completion a #
Instances
runCompletion :: Completion r -> ParserPrefs -> Maybe (Either (SomeParser, ArgPolicy) Completer) #
contextNames :: [Context] -> [String] #