Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Parser m a
- type Error = Maybe ErrorDetails
- data ErrorDetails
- run :: Monad m => Parser m a -> ListT m Token -> m (Either Error a)
- token :: Monad m => Parser m Token
- openingTag :: Monad m => Parser m OpeningTag
- closingTag :: Monad m => Parser m ClosingTag
- text :: Monad m => Parser m Text
- comment :: Monad m => Parser m Text
- manyTill :: Monad m => Parser m a -> Parser m b -> Parser m ([a], b)
- skipTill :: Monad m => Parser m a -> Parser m a
Documentation
A backtracking HTML parser.
type Error = Maybe ErrorDetails Source
data ErrorDetails Source
UnexpectedToken | Unexpected token |
EOI | End of input |
Show ErrorDetails | |
Monad m => MonadError Error (Parser m) |
run :: Monad m => Parser m a -> ListT m Token -> m (Either Error a) Source
Run a parser on a stream of HTML tokens, consuming only as many as needed.
Parsers
openingTag :: Monad m => Parser m OpeningTag Source
closingTag :: Monad m => Parser m ClosingTag Source