-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | An "attoparsec"-based HTML tokenizer
--
-- This library can be used as a basis for complex HTML parsers, or for
-- streaming. E.g., by composing it with the "list-t-attoparsec"
-- library you can produce a token stream, thus becoming able to
-- implement a highly efficient stream-parser, which works in a single
-- pass, constant memory and is capable of early termination.
-- "list-t-html-parser" is such a parser.
@package html-tokenizer
@version 0.4.1
module HTMLTokenizer
-- | An HTML token.
data Token
-- | A Doctype declaration.
Token_Doctype :: Text -> Token
-- | An opening tag.
Token_OpeningTag :: OpeningTag -> Token
-- | A closing tag.
Token_ClosingTag :: Identifier -> Token
-- | A text between tags.
Token_Text :: Text -> Token
-- | Contents of a comment.
Token_Comment :: Text -> Token
-- | An opening tag name, attributes and whether it is closed.
type OpeningTag = (Identifier, [Attribute], Bool)
-- | A case-insensitive identifier.
data Identifier
Identifier :: (Maybe (CI Text)) -> (CI Text) -> Identifier
-- | A tag attribute identifier and a value.
type Attribute = (Identifier, Maybe Text)
-- | A token parser.
--
-- Does not decode entities.
token :: Parser Token
instance Data.Data.Data HTMLTokenizer.Token
instance GHC.Generics.Generic HTMLTokenizer.Token
instance GHC.Classes.Eq HTMLTokenizer.Token
instance GHC.Classes.Ord HTMLTokenizer.Token
instance GHC.Show.Show HTMLTokenizer.Token
instance Data.Data.Data HTMLTokenizer.Identifier
instance GHC.Generics.Generic HTMLTokenizer.Identifier
instance GHC.Classes.Eq HTMLTokenizer.Identifier
instance GHC.Classes.Ord HTMLTokenizer.Identifier
instance GHC.Show.Show HTMLTokenizer.Identifier
instance Data.String.IsString HTMLTokenizer.Identifier