-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | streamlined html tag parser
--   
--   Tag-stream is a library for parsing HTML<i></i>XML to a token stream.
--   It can parse unstructured and malformed HTML from the web. It also
--   provides an Enumeratee which can parse streamline html, which means it
--   consumes constant memory. You can start from the `tests/Tests.hs`
--   module to see what it can do.
@package tagstream-conduit
@version 0.5.4

module Text.HTML.TagStream.Types
type Attr' s = (s, s)
data Token' s
TagOpen :: s -> [Attr' s] -> Bool -> Token' s
TagClose :: s -> Token' s
Text :: s -> Token' s
Comment :: s -> Token' s
Special :: s -> s -> Token' s
Incomplete :: s -> Token' s
data TagType
TagTypeClose :: TagType
TagTypeSpecial :: TagType
TagTypeNormal :: TagType
instance Eq s => Eq (Token' s)
instance Show s => Show (Token' s)
instance Traversable Token'
instance Foldable Token'
instance Functor Token'

module Text.HTML.TagStream.Utils
splitAccum :: Monoid s => [Token' s] -> (s, [Token' s])

module Text.HTML.TagStream.ByteString
type Token = Token' ByteString
type Attr = Attr' ByteString
quoted :: Char -> Parser ByteString
quotedOr :: Parser ByteString -> Parser ByteString
attrValue :: Parser ByteString
attrName :: Parser ByteString
tagEnd :: Parser Bool
attr :: Parser Attr
attrs :: Parser ([Attr], Bool)
comment :: Parser Token
special :: Parser Token
tag :: Parser Token
incomplete :: Parser Token
text :: Parser Token
token :: Parser Token
tillScriptEnd :: Token -> Parser [Token]
html :: Parser [Token]
decode :: ByteString -> Either String [Token]
atLeast :: Int -> Parser ByteString -> Parser ByteString
cond :: a -> a -> Bool -> a
(||.) :: Applicative f => f Bool -> f Bool -> f Bool
in2 :: Eq a => (a, a) -> a -> Bool
in3 :: Eq a => (a, a, a) -> a -> Bool
boolP :: Parser a -> Parser Bool
maybeP :: Parser a -> Parser (Maybe a)
cc :: [ByteString] -> Builder
showToken :: (ByteString -> ByteString) -> Token -> Builder
tokenStream :: Monad m => Conduit ByteString m Token

module Text.HTML.TagStream.Text
type Token = Token' Text
type Attr = Attr' Text
quoted :: Char -> Parser Text
quotedOr :: Parser Text -> Parser Text
attrValue :: Parser Text
attrName :: Parser Text
tagEnd :: Parser Bool
attr :: Parser Attr
attrs :: Parser ([Attr], Bool)
comment :: Parser Token
special :: Parser Token
tag :: Parser Token
incomplete :: Parser Token
text :: Parser Token
token :: Parser Token
tillScriptEnd :: Token -> Parser [Token]
html :: Parser [Token]
decode :: Text -> Either String [Token]
atLeast :: Int -> Parser Text -> Parser Text
cond :: a -> a -> Bool -> a
(||.) :: Applicative f => f Bool -> f Bool -> f Bool
in2 :: Eq a => (a, a) -> a -> Bool
in3 :: Eq a => (a, a, a) -> a -> Bool
boolP :: Parser a -> Parser Bool
maybeP :: Parser a -> Parser (Maybe a)
cc :: [Text] -> Builder
showToken :: (Text -> Text) -> Token -> Builder
tokenStream :: Monad m => Conduit Text m Token

-- | like <a>tokenStream</a>, but it process <a>ByteString</a> input,
--   decode it according to xml version tag.
--   
--   Only support utf-8 and iso8859 for now.
tokenStreamBS :: MonadThrow m => Conduit ByteString m Token

module Text.HTML.TagStream
