ConditionalRestriction.Parse.ParserLib
Description
Parsing library. Implements a simple Parser type.
Parser
data Parser i a Source #
A generic parser. Takes an input type i and returns an output type a.
i
a
Defined in ConditionalRestriction.Internal.Parse.ParserLib
Methods
empty :: Parser i a #
(<|>) :: Parser i a -> Parser i a -> Parser i a #
some :: Parser i a -> Parser i [a] #
many :: Parser i a -> Parser i [a] #
pure :: a -> Parser i a #
(<*>) :: Parser i (a -> b) -> Parser i a -> Parser i b #
liftA2 :: (a -> b -> c) -> Parser i a -> Parser i b -> Parser i c #
(*>) :: Parser i a -> Parser i b -> Parser i b #
(<*) :: Parser i a -> Parser i b -> Parser i a #
fmap :: (a -> b) -> Parser i a -> Parser i b #
(<$) :: a -> Parser i b -> Parser i a #
(>>=) :: Parser i a -> (a -> Parser i b) -> Parser i b #
(>>) :: Parser i a -> Parser i b -> Parser i b #
return :: a -> Parser i a #
parse :: Parser i a -> i -> Result String (a, i) Source #