packages feed

hexpat-streamparser 0.1.2 → 0.1.3

raw patch · 2 files changed

+12/−4 lines, 2 filesdep ~cps-exceptdep ~hexpat-streamparserPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: cps-except, hexpat-streamparser

API changes (from Hackage documentation)

+ Text.XML.Expat.StreamParser: mapParser :: (Monad m, Monad n) => (forall b. m b -> n b) -> EventParser l e m a -> EventParser l e n a

Files

hexpat-streamparser.cabal view
@@ -1,7 +1,7 @@ cabal-version: 1.12 name: hexpat-streamparser description: streaming xml parser combinators using hexpat-version: 0.1.2+version: 0.1.3 maintainer: kristof@resonata.be copyright: Kristof Bastiaensen 2020 license: BSD3@@ -28,7 +28,7 @@         parser-combinators >= 1.2 && < 1.3,         transformers >= 0.5 && < 0.6,         bytestring >= 0.10 && < 0.11,-        cps-except >= 0.0.1.0+        cps-except >= 0.0.1.2    default-extensions: OverloadedStrings  test-suite test@@ -40,7 +40,7 @@     test.hs   build-depends:     hexpat >= 0.20 && < 0.21,     -    hexpat-streamparser == 0.1.2,+    hexpat-streamparser == 0.1.3,     base >= 4 && < 5,     hspec   default-extensions: OverloadedStrings
src/Text/XML/Expat/StreamParser.hs view
@@ -34,6 +34,7 @@   , EventParser   , EventLoc   , EventParseError (..)+  , mapParser   , runEventParser   , customError   , -- * Running parsers@@ -160,6 +161,13 @@                       a   } deriving (Functor, Applicative, Monad, MonadError (EventParseError e)) +-- | Change the base monad of a parser+mapParser :: (Monad m, Monad n)+          => (forall b . m b -> n b)+          -> EventParser l e m a -> EventParser l e n a+mapParser tr (EventParser parser) =+  EventParser $ mapCPSExceptT (mapStateT tr) parser+ -- | Throw an error with a custom type.  If the custom error type -- provides an `IsString` instance, you can also use `fail` (for example -- Text, String).@@ -263,7 +271,7 @@ -- However this function does not close resources, for example a file -- handle when using `readFile`.  Make sure to always explicitly close -- a resource, /after/ evaluating to WHNF, or use the streaming--- version of this library (hexpat-streamparser-conduit).  For reading+-- version of this library (hexpat-conduit).  For reading -- from a file use the `parseXMLFile` function. parseXMLByteString :: EventListParser e a                    -> Expat.ParseOptions Text Text