Safe Haskell | Safe |
---|---|
Language | Haskell98 |
Options.Applicative.Internal
Documentation
class (Alternative m, MonadPlus m) => MonadP m where #
Minimal complete definition
enterContext, exitContext, getPrefs, missingArgP, tryP, errorP, exitP
Methods
enterContext :: String -> ParserInfo a -> m () #
exitContext :: m () #
getPrefs :: m ParserPrefs #
missingArgP :: ParseError -> Completer -> m a #
tryP :: m a -> m (Either ParseError a) #
errorP :: ParseError -> m a #
exitP :: IsCmdStart -> Parser b -> Maybe a -> m a #
data ParseError #
Constructors
ErrorMsg String | |
InfoMsg String | |
ShowHelpText | |
UnknownError | |
MissingError IsCmdStart SomeParser |
Instances
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 #
runCompletion :: Completion r -> ParserPrefs -> Maybe (Either SomeParser Completer) #
contextNames :: [Context] -> [String] #