packages feed

dtd 0.4.0 → 0.4.1

raw patch · 3 files changed

+9/−12 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Data.DTD.Cache: Def :: Text -> Att
+ Data.DTD.Cache: Fixed :: Text -> Att
+ Data.DTD.Cache: data Att
+ Data.DTD.Cache: type AttrMap = Map Name (Map Name Att)
+ Data.DTD.Cache: type EntityMap = Map Text Text

Files

Data/DTD/Cache.hs view
@@ -10,6 +10,9 @@     , newDTDCacheFile
     , loadAttrMap
     , UnresolvedEntity (..)
+    , AttrMap
+    , EntityMap
+    , Att (..)
     ) where
 
 import qualified Text.XML as X
Data/DTD/Parse.hs view
@@ -64,17 +64,11 @@                 C.$= streamUnresolved
                 C.$= CL.concatMap id
                 C.$= resolveEnum rr
-    addCatch = id -- FIXME
-    {-
-    addCatch src = C.Source
-        { C.sourcePull = do
-            res <- C.sourcePull src `Lifted.catch` (lift . throw rr)
-            return $ case res of
-                C.Open src' val -> C.Open (addCatch src') val
-                C.Closed -> C.Closed
-        , C.sourceClose = return ()
-        }
-        -}
+    addCatch (C.Open src close x) = C.Open (addCatch src) (addCatch' close) x
+    addCatch C.Closed = C.Closed
+    addCatch (C.SourceM msrc close) = C.SourceM (addCatch' $ liftM addCatch msrc) (addCatch' close)
+
+    addCatch' m = m `Lifted.catch` throw rr
 
 throw :: C.MonadThrow m => ResolveReader -> SomeException -> m a
 throw rr e =
dtd.cabal view
@@ -1,5 +1,5 @@ Name:                dtd
-Version:             0.4.0
+Version:             0.4.1
 Synopsis:            Parse and render DTD files
 Homepage:            http://github.com/snoyberg/xml
 License:             BSD3