   setStartElementHandler, setEndElementHandler, setCharacterDataHandler,
 
   -- ** Lower-level interface
+  unsafeParseChunk,
   withHandlers,
   unsafeSetHandlers,
   unsafeReleaseHandlers,
   ExpatHandlers,
-  unsafeParseChunk,
 
   -- ** Helpers
   encodingToString

           -> IO (Maybe XMLParseError)
parseChunk parser xml final = withHandlers parser $ unsafeParseChunk parser xml final

-- | This version of parseChunk must either be called inside withHandlers (safest), or
-- between 'unsafeSetHandlers' and 'unsafeReleaseHandlers', and this
-- will give you better performance if you process multiple chunks inside.
unsafeParseChunk :: Parser
           -> BS.ByteString
           -> Bool

    freeHaskellFunPtr cEndH
    freeHaskellFunPtr cCharH

-- | 'unsafeParseChunk' is required to be called inside @withHandlers@.
-- Safer than using 'unsafeSetHandlers' / 'unsafeReleaseHandlers'.
withHandlers :: Parser
             -> IO a  -- ^ Computation where unsafeParseChunk may be used
             -> IO a
withHandlers parser code = do
    bracket
        (unsafeSetHandlers parser)
