packages feed

hexpat 0.17 → 0.18

raw patch · 4 files changed

+8/−7 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- Text.XML.Expat.Annotated: defaultEncoding :: ParseOptions tag text -> Maybe Encoding
- Text.XML.Expat.SAX: defaultEncoding :: ParseOptions tag text -> Maybe Encoding
- Text.XML.Expat.Tree: defaultEncoding :: ParseOptions tag text -> Maybe Encoding
+ Text.XML.Expat.Annotated: overrideEncoding :: ParseOptions tag text -> Maybe Encoding
+ Text.XML.Expat.SAX: overrideEncoding :: ParseOptions tag text -> Maybe Encoding
+ Text.XML.Expat.Tree: overrideEncoding :: ParseOptions tag text -> Maybe Encoding

Files

Text/XML/Expat/SAX.hs view
@@ -62,7 +62,7 @@   data ParseOptions tag text = ParseOptions-    { defaultEncoding :: Maybe Encoding+    { overrideEncoding :: Maybe Encoding           -- ^ The encoding parameter, if provided, overrides the document's           -- encoding declaration.     , entityDecoder  :: Maybe (tag -> Maybe text)@@ -195,7 +195,7 @@       -> L.ByteString           -- ^ Input text (a lazy ByteString)       -> [SAXEvent tag text] parse opts input = unsafePerformIO $ do-    let enc = defaultEncoding opts+    let enc = overrideEncoding opts     let mEntityDecoder = entityDecoder opts      parser <- newParser enc@@ -270,7 +270,7 @@                -> L.ByteString            -- ^ Input text (a lazy ByteString)                -> [(SAXEvent tag text, XMLParseLocation)] parseLocations opts input = unsafePerformIO $ do-    let enc = defaultEncoding opts+    let enc = overrideEncoding opts     let mEntityDecoder = entityDecoder opts      -- Done with cut & paste coding for maximum speed.
Text/XML/Expat/Tree.hs view
@@ -319,7 +319,7 @@        -> Either XMLParseError (Node tag text) parse' opts doc = unsafePerformIO $ runParse where   runParse = do-    let enc = defaultEncoding opts+    let enc = overrideEncoding opts     let mEntityDecoder = entityDecoder opts      parser <- newParser enc
hexpat.cabal view
@@ -1,6 +1,6 @@ Cabal-Version: >= 1.6 Name: hexpat-Version: 0.17+Version: 0.18 Synopsis: XML parser/formatter based on expat Description:   This package provides a general purpose Haskell XML library using Expat to@@ -41,7 +41,8 @@   .   ChangeLog: 0.15 changes intended to fix a (rare) \"error: a C finalizer called back into Haskell.\"     that seemed only to happen only on ghc6.12.X; 0.15.1 Fix broken Annotated parse;-    0.16 switch from mtl to transformers; 0.17 fix mapNodeContainer & rename some things.+    0.16 switch from mtl to transformers; 0.17 fix mapNodeContainer & rename some things.;+    0.18 rename defaultEncoding to overrideEncoding. Category: XML License: BSD3 License-File: LICENSE
test/suite/Text/XML/Expat/UnitTests.hs view
@@ -58,7 +58,7 @@             hPutStrLn stderr $ "parse failed: "++show error             assertFailure descr   where-    popts = defaultParseOptions { defaultEncoding = Just UTF8 }+    popts = defaultParseOptions { overrideEncoding = Just UTF8 }   eitherify f mEnc bs = do