Module

Text.Parsing.Combinators.Validation

#and

and :: forall a m b c. 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

or :: forall a m b c. 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

not :: forall a m b. 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

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

Lifts the remaining parse input for validation purposes. Does not consume the remaining parse input.

#output

output :: forall a m b c. 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

success :: forall a m b c. 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

failure :: forall a m b c. 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

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

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

#right

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

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

#just

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

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

#nothing

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

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

#apply

apply :: forall a m f b c. 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.

Modules