hydrogen-util-0.8: Hydrogen Tools

Safe HaskellNone




type Parser source result = source -> Either SomethingBad result Source

data ParseError :: *

The abstract data type ParseError represents parse errors. It provides the source position (SourcePos) of the error and a list of error messages (Message). A ParseError can be returned by the function parse. ParseError is an instance of the Show class.


type Tokens t = [(SourcePos, t)] Source

sourceToken :: (Show t, Stream (Tokens t) m (SourcePos, t)) => (t -> Maybe a) -> ParsecT [(SourcePos, t)] u m a Source

manyBetween :: (Monad m, Stream s m t) => ParsecT s u m open -> ParsecT s u m close -> ParsecT s u m p -> ParsecT s u m [p] Source

(>+>) :: Parser a b -> Parser b c -> Parser a c Source

(<+<) :: Parser b c -> Parser a b -> Parser a c Source