-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | wrapper for expat, the fast XML parser
--
-- wrapper for expat, the fast XML parser
@package hexpat
@version 0.1
module C2HS
withCStringLenIntConv :: (Integral b) => String -> ((Ptr CChar, b) -> IO a) -> IO a
peekCStringLenIntConv :: (Integral t) => (Ptr CChar, t) -> IO String
withIntConv :: (Storable b, Integral a, Integral b) => a -> (Ptr b -> IO c) -> IO c
withFloatConv :: (Storable b, RealFloat a, RealFloat b) => a -> (Ptr b -> IO c) -> IO c
peekIntConv :: (Storable a, Integral a, Integral b) => Ptr a -> IO b
peekFloatConv :: (Storable a, RealFloat a, RealFloat b) => Ptr a -> IO b
withBool :: (Integral a, Storable a) => Bool -> (Ptr a -> IO b) -> IO b
peekBool :: (Integral a, Storable a) => Ptr a -> IO Bool
withEnum :: (Enum a, Integral b, Storable b) => a -> (Ptr b -> IO c) -> IO c
peekEnum :: (Enum a, Integral b, Storable b) => Ptr b -> IO a
nothingIf :: (a -> Bool) -> (a -> b) -> a -> Maybe b
-- | Instance for special casing null pointers.
nothingIfNull :: (Ptr a -> b) -> Ptr a -> Maybe b
combineBitMasks :: (Enum a, Bits b) => [a] -> b
containsBitMask :: (Bits a, Enum b) => a -> b -> Bool
-- | Given a bit pattern, yield all bit masks that it contains.
--
--
-- - This does *not* attempt to compute a minimal set of bit masks that
-- when combined yield the bit pattern, instead all contained bit masks
-- are produced.
--
extractBitMasks :: (Bits a, Enum b, Bounded b) => a -> [b]
-- | Integral conversion
cIntConv :: (Integral a, Integral b) => a -> b
-- | Floating conversion
cFloatConv :: (RealFloat a, RealFloat b) => a -> b
-- | Obtain Haskell Bool from C value.
cToBool :: (Num a) => a -> Bool
-- | Obtain C value from Haskell Bool.
cFromBool :: (Num a) => Bool -> a
-- | Convert a C enumeration to Haskell.
cToEnum :: (Integral i, Enum e) => i -> e
-- | Convert a Haskell enumeration to C.
cFromEnum :: (Enum e, Integral i) => e -> i
instance (Storable a) => Storable (Maybe a)
-- | This module wraps the Expat API directly, with IO.
module Text.XML.Expat.IO
data Parser
-- | Create a Parser. The optional parameter is the default
-- character encoding, and can be one of
--
--
-- - "US-ASCII"
-- - "UTF-8"
-- - "UTF-16"
-- - "ISO-8859-1"
--
newParser :: Maybe String -> IO Parser
-- | parse data False feeds mode data into a Parser. The
-- end of the data is indicated by passing True for the final parameter.
-- parse returns False on a parse error.
parse :: Parser -> String -> Bool -> IO (Bool)
-- | The type of the "element started" callback. The first parameter is the
-- element name; the second are the (attribute, value) pairs.
type StartElementHandler = String -> [(String, String)] -> IO ()
-- | The type of the "element ended" callback. The parameter is the element
-- name.
type EndElementHandler = String -> IO ()
-- | The type of the "character data" callback. The parameter is the
-- character data processed. This callback may be called more than once
-- while processing a single conceptual block of text.
type CharacterDataHandler = String -> IO ()
-- | Attach a StartElementHandler to a Parser.
setStartElementHandler :: Parser -> StartElementHandler -> IO ()
-- | Attach an EndElementHandler to a Parser.
setEndElementHandler :: Parser -> EndElementHandler -> IO ()
-- | Attach an CharacterDataHandler to a Parser.
setCharacterDataHandler :: Parser -> CharacterDataHandler -> IO ()
-- | The Expat.Tree module provides a simplified interface to parsing, that
-- returns a tree of the XML structure. (Note that this is not a lazy
-- parse of the document: as soon as the root node is accessed, the
-- entire document is parsed.)
module Text.XML.Expat.Tree
-- | parse enc doc parses XML content doc with optional
-- encoding enc, and returns the root Node of the
-- document if there were no parsing errors.
parse :: Maybe String -> String -> Maybe Node
-- | Simplistic XML tree representation.
data Node
Element :: String -> [(String, String)] -> [Node] -> Node
eName :: Node -> String
eAttrs :: Node -> [(String, String)]
eChildren :: Node -> [Node]
Text :: String -> Node
instance Show Node