Module

Text.Parsing.Combinators.Validation

Package
purescript-parsing-validationDEPRECATED
Repository
markfarrell/purescript-parsing-validation

#and Source

and :: forall c b m a. Monad m => ParserT a m b -> ParserT a m c -> ParserT a m (Tuple b c)

Attempts to validate the remaining parse input with a parser p and a parser q. Fails if the validation of the remaining parse input with parsers p and q is unsuccessful. Does not consume the remaining parse input.

#or Source

or :: forall c b m a. Monad m => ParserT a m b -> ParserT a m c -> ParserT a m (Either b c)

Attempts to validate the remaining parse input with a parser q, or a parser p if q fails. Fails if the validation of the remaining parse input with parsers p or q is unsuccessful. Does not consume the remaining parse input.

#not Source

not :: forall b m a. Monad m => ParserT a m b -> ParserT a m Unit

Fails if the result of applying the parser p to the remaining parse input is successful. Does not consume the remaining parse input.

#input Source

input :: forall b m a. Monad m => ParserT a m b -> ParserT a m b

Runs a parser p against the remaining parse input for validation purposes. Does not consume the remaining parse input.

#output Source

output :: forall c b m a. Monad m => ParserT a m b -> ParserT b m c -> ParserT a m c

Runs a parser p against the remaining parse input, and q against the result if successful. Does not consume the remaining parse input.

#success Source

success :: forall c b m a. Monad m => ExceptT a m b -> ParserT c m b

Fails if the parsed result throws an exception when run. Dones not consume remaining parse input

#failure Source

failure :: forall c b m a. Monad m => ExceptT a m b -> ParserT c m a

Fails if the parsed result throws is successful when run. Dones not consume remaining parse input

#left Source

left :: forall c b m a. Monad m => (Either b c) -> ParserT a m b

Fails if the parsed result is left. Does not consume the remaining parse input.

#right Source

right :: forall c b m a. Monad m => (Either b c) -> ParserT a m c

Fails if the parsed result is right. Does not consume the remaining parse input.

#just Source

just :: forall b m a. Monad m => (Maybe b) -> ParserT a m b

Fails if the parsed result is nothing. Does not consume the remaining parse input.

#nothing Source

nothing :: forall b m a. Monad m => (Maybe b) -> ParserT a m Unit

Fails if the parsed result is not nothing. Does not consume the remaining parse input.

#apply Source

apply :: forall c b f m a. Monad m => Traversable m => Applicative f => Traversable f => ParserT a m c -> ParserT b m (f a) -> ParserT b m (f c)

Fails if a result of running a parser p against each value of a container produced by a parser q is unsuccessful. Does not consume the remaining parse input.