Safe HaskellSafe

ParserBase

Documentation

data Parser a #

Instances

Monad Parser # 

Methods

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

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

return :: a -> Parser a

fail :: String -> Parser a

Functor Parser # 

Methods

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

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

Applicative Parser # 

Methods

pure :: a -> Parser a

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

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

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

MonadPlus Parser # 

Methods

mzero :: Parser a

mplus :: Parser a -> Parser a -> Parser a

Alternative Parser # 

Methods

empty :: Parser a

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

some :: Parser a -> Parser [a] #

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

get :: Parser Char #

parse :: Parser a -> String -> a #

parseFile :: Parser a -> String -> IO a #

parseNamed :: Parser a -> String -> String -> a #

(<||>) :: Parser a -> Parser a -> Parser a infixl 3 #

succeeding :: a -> Parser a -> Parser a #

eof :: Parser () #

(<|>) :: Alternative f => forall a. f a -> f a -> f a #

some :: Alternative f => forall a. f a -> f [a] #

many :: Alternative f => forall a. f a -> f [a] #