hexpat-iteratee 0.2 → 0.3
raw patch · 2 files changed
+8/−8 lines, 2 filesdep ~hexpatPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: hexpat
API changes (from Hackage documentation)
Files
- Text/XML/Expat/Chunked.hs +6/−6
- hexpat-iteratee.cabal +2/−2
Text/XML/Expat/Chunked.hs view
@@ -133,7 +133,7 @@ (rootHd, rootTl) <- liftIO $ newQueue stackRef <- liftIO $ newIORef [rootTl] - liftIO $ IO.setStartElementHandler parser $ \cName cAttrs -> do+ liftIO $ IO.setStartElementHandler parser $ \_ cName cAttrs -> do name <- textFromCString cName attrs <- forM cAttrs $ \(cAttrName,cAttrValue) -> do attrName <- textFromCString cAttrName@@ -145,14 +145,14 @@ push (head stack) $ Element name attrs (ListT $ iter hd) writeIORef stackRef (tl:stack) return True- liftIO $ IO.setEndElementHandler parser $ \_ -> do+ liftIO $ IO.setEndElementHandler parser $ \_ _ -> do --name <- textFromCString cName --loc <- getParseLocation parser stack <- readIORef stackRef pushEnd (head stack) writeIORef stackRef (tail stack) return True- liftIO $ IO.setCharacterDataHandler parser $ \cText -> do+ liftIO $ IO.setCharacterDataHandler parser $ \_ cText -> do txt <- gxFromCStringLen cText --loc <- getParseLocation parser stack <- readIORef stackRef@@ -165,9 +165,9 @@ case str of EOF (Just err) -> return $ Done (Left err) str _ -> do- mErr <- case str of- Chunk (WrapBS blk) -> liftIO $ IO.parseChunk parser blk False- EOF _ -> liftIO $ IO.parseChunk parser B.empty True+ mErr <- liftIO $ IO.withParser parser $ \pp -> case str of+ Chunk (WrapBS blk) -> IO.parseChunk pp blk False+ EOF _ -> IO.parseChunk pp B.empty True res <- runHandlerT c
hexpat-iteratee.cabal view
@@ -1,6 +1,6 @@ Cabal-Version: >= 1.6 Name: hexpat-iteratee-Version: 0.2+Version: 0.3 Synopsis: Chunked XML parsing using iteratees Description: This package provides chunked XML parsing using iteratees. It is especially suited@@ -48,7 +48,7 @@ containers, extensible-exceptions >= 0.1 && < 0.2, iteratee >= 0.3,- hexpat >= 0.13,+ hexpat >= 0.15, List >= 0.3 Exposed-Modules: Text.XML.Expat.Chunked