Options.Applicative.Internal

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

Safe Haskell | Safe
Language | Haskell98

Options.Applicative.Internal

# Documentation

data P a

Instances

Monad P |
Functor P |
Applicative P |
Alternative P |
MonadPlus P |
MonadP P |

data Context

Constructors

forall a . Context String (ParserInfo a) |

class (Alternative m, MonadPlus m) => MonadP m where

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 :: Parser b -> Either ParseError a -> m a

Instances

MonadP Completion |
MonadP P |

data ParseError

Constructors

ErrorMsg String |
InfoMsg String |
ShowHelpText |
UnknownError |
MissingError (OptTree (Chunk Doc)) |

Instances

Show ParseError |
Monoid 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

Instances

Monad Completion |
Functor Completion |
Applicative Completion |
Alternative Completion |
MonadPlus Completion |
MonadP Completion |

runCompletion :: Completion r -> ParserPrefs -> Maybe (Either SomeParser Completer)

data SomeParser

Constructors

forall a . SomeParser (Parser a) |

data ComplError

Constructors

ComplParseError String |
ComplExit |

contextNames :: [Context] -> [String]

data ListT m a

Instances

MonadTrans ListT |
Monad m => Monad (ListT m) |
Monad m => Functor (ListT m) |
Monad m => Applicative (ListT m) |
Monad m => Alternative (ListT m) |
Monad m => MonadPlus (ListT m) |

takeListT :: Monad m => Int -> ListT m a -> ListT m a

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

data NondetT m a

Instances

MonadTrans NondetT |
Monad m => Monad (NondetT m) |
Monad m => Functor (NondetT m) |
Monad m => Applicative (NondetT m) |
Monad m => Alternative (NondetT m) |
Monad m => MonadPlus (NondetT m) |

cut :: Monad m => NondetT m ()

(<!>) :: Monad m => NondetT m a -> NondetT m a -> NondetT m a

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