Safe HaskellSafe

Parse

Documentation

data Parser t a Source #

Instances

Monad (Parser t) # 

Methods

(>>=) :: Parser t a -> (a -> Parser t b) -> Parser t b #

(>>) :: Parser t a -> Parser t b -> Parser t b #

return :: a -> Parser t a #

fail :: String -> Parser t a #

Functor (Parser t) # 

Methods

fmap :: (a -> b) -> Parser t a -> Parser t b #

(<$) :: a -> Parser t b -> Parser t a #

Applicative (Parser t) # 

Methods

pure :: a -> Parser t a #

(<*>) :: Parser t (a -> b) -> Parser t a -> Parser t b #

liftA2 :: (a -> b -> c) -> Parser t a -> Parser t b -> Parser t c #

(*>) :: Parser t a -> Parser t b -> Parser t b #

(<*) :: Parser t a -> Parser t b -> Parser t a #

between :: Parser t a -> Parser t b -> Parser t c -> Parser t c Source #

eoi :: Parser t () Source #

many :: Parser t a -> Parser t [a] Source #

many1 :: Parser t a -> Parser t [a] Source #

manyTill :: Parser t a -> Parser t b -> Parser t [a] Source #

noneof :: Eq t => [t] -> Parser t t Source #

oneof :: Eq t => [t] -> Parser t t Source #

parse :: Parser t a -> [t] -> Maybe a Source #

sat :: (t -> Bool) -> Parser t t Source #

test :: Parser t a -> [t] -> a Source #

token :: (t -> Maybe a) -> Parser t a Source #

(<|>) :: Parser t a -> Parser t a -> Parser t a Source #