packages feed

dtd 0.6.1.2 → 1.1.0

raw patch · 2 files changed

+21/−21 lines, 2 filesdep ~attoparsec-conduitdep ~conduitdep ~uri-conduit

Dependency ranges changed: attoparsec-conduit, conduit, uri-conduit, xml-catalog, xml-conduit

Files

Data/DTD/Parse.hs view
@@ -25,7 +25,7 @@ import Text.XML.Catalog (resolveURI, Catalog) import Network.URI.Conduit (URI, SchemeMap, readURI, toNetworkURI, toSchemeMap) import Network.URI.Conduit.File (decodeString, fileScheme)-import Data.Conduit hiding (Source, Sink, Conduit)+import Data.Conduit import qualified Data.Conduit.Internal as CI import Text.XML.Stream.Parse (detectUtf) import Data.Conduit.Attoparsec (conduitParser)@@ -42,7 +42,7 @@         => Catalog         -> ExternalID         -> SchemeMap-        -> Pipe l i DTDComponent u m ()+        -> Producer m DTDComponent readEID catalog eid sm =     case resolveURI catalog Nothing eid of         Nothing -> liftIO $ throwIO $ CannotResolveExternalID eid@@ -52,20 +52,20 @@             readerToEnum rr  readerToEnum :: (MonadBaseControl IO m, MonadThrow m, MonadIO m, MonadResource m)-             => ResolveReader -> Pipe l i DTDComponent u m ()+             => ResolveReader -> Producer m DTDComponent readerToEnum rr =-    addCatch src0+    CI.ConduitM $ addCatch $ CI.unConduitM src0   where     src0 =         readURI (rrSchemeMap rr) (rrBase rr)-                >+> detectUtf-                >+> streamUnresolved-                >+> CL.concatMap id-                >+> resolveEnum rr+                =$= detectUtf+                =$= streamUnresolved+                =$= CL.concatMap id+                =$= resolveEnum rr      addCatch :: (MonadThrow m, MonadBaseControl IO m)-             => Pipe l i o u m r-             -> Pipe l i o u m r+             => CI.Pipe l i o u m r+             -> CI.Pipe l i o u m r     addCatch (CI.HaveOutput src close x) = CI.HaveOutput (addCatch src) (addCatch' close) x     addCatch (CI.NeedInput p c) = CI.NeedInput (addCatch . p) (addCatch . c)     addCatch (CI.Done r) = CI.Done r@@ -81,7 +81,7 @@ readFile_ :: FilePath -> IO [DTDComponent] readFile_ fp = runResourceT $ enumFile fp $$ CL.consume -enumFile :: (MonadBaseControl IO m, MonadResource m) => FilePath -> Pipe l i DTDComponent u m ()+enumFile :: (MonadBaseControl IO m, MonadResource m) => FilePath -> Producer m DTDComponent enumFile fp = do     eid <- lift $ filePathToEID fp     readEID Map.empty eid $ toSchemeMap [fileScheme]@@ -92,9 +92,9 @@ uriToEID :: URI -> ExternalID uriToEID = SystemID . T.pack . show . toNetworkURI -streamUnresolved :: MonadThrow m => Pipe l T.Text [U.DTDComponent] r m r+streamUnresolved :: MonadThrow m => Conduit T.Text m [U.DTDComponent] streamUnresolved =-    mapOutput snd $ injectLeftovers $ conduitParser p+    mapOutput snd $ conduitParser p   where     p = (UP.ws >> UP.skipWS >> return []) <|>         (UP.textDecl >> return []) <|>@@ -103,7 +103,7 @@  resolveEnum :: (MonadBaseControl IO m, MonadThrow m, MonadIO m, MonadUnsafeIO m)             => ResolveReader-            -> Pipe l U.DTDComponent DTDComponent r m r+            -> Conduit U.DTDComponent m DTDComponent resolveEnum rr = transPipe (evalStateT' rr) $ awaitForever resolvef  evalStateT' :: Monad m@@ -145,7 +145,7 @@  resolvef :: (MonadBaseControl IO m, MonadThrow m, MonadIO m, MonadUnsafeIO m)          => U.DTDComponent-         -> Pipe l U.DTDComponent DTDComponent u (ResolveMonad m) ()+         -> Conduit U.DTDComponent (ResolveMonad m) DTDComponent  -- passthrough, no modification needed resolvef (U.DTDNotation x) = yield $ DTDNotation x
dtd.cabal view
@@ -1,5 +1,5 @@ Name:                dtd-Version:             0.6.1.2+Version:             1.1.0 Synopsis:            Parse and render DTD files Homepage:            http://github.com/snoyberg/xml License:             BSD3@@ -21,17 +21,17 @@   Build-depends:       base                     >= 4          && < 5                      , text                     >= 0.11                      , containers               >= 0.2-                     , xml-conduit              >= 1.0        && < 1.1-                     , uri-conduit              >= 0.5        && < 0.6+                     , xml-conduit              >= 1.1        && < 1.2+                     , uri-conduit              >= 1.1        && < 1.2                      , transformers             >= 0.2                      , xml-types                >= 0.3        && < 0.4                      , attoparsec               >= 0.10       && < 0.11                      , monad-control            >= 0.3        && < 0.4-                     , xml-catalog              >= 0.8        && < 0.9+                     , xml-catalog              >= 1.1        && < 1.2                      , blaze-builder            >= 0.3        && < 0.4                      , network                  >= 2.2                      , resourcet                >= 0.3        && < 0.5-                     , conduit                  >= 0.5        && < 0.6-                     , attoparsec-conduit       >= 0.5        && < 0.6+                     , conduit                  >= 1.0        && < 1.1+                     , attoparsec-conduit       >= 1.0        && < 1.1                      , lifted-base              >= 0.1   Ghc-options: -Wall