hxt 9.3.1.3 → 9.3.1.4
raw patch · 2 files changed
+18/−2 lines, 2 files
Files
- hxt.cabal +4/−1
- src/Text/XML/HXT/Arrow/Pickle/Xml.hs +14/−1
hxt.cabal view
@@ -1,6 +1,6 @@ -- arch-tag: Haskell XML Toolbox main description file Name: hxt-Version: 9.3.1.3+Version: 9.3.1.4 Synopsis: A collection of tools for processing XML with Haskell. Description: The Haskell XML Toolbox bases on the ideas of HaXml and HXML, but introduces a more general approach for processing XML with Haskell.@@ -15,6 +15,9 @@ hxt-curl, hxt-tagsoup, hxt-relaxng, hxt-xpath, hxt-xslt, hxt-regex-xmlschema contain the extensions. hxt-unicode contains encoding and decoding functions, hxt-charproperties char properties for unicode and XML.+ .+ Changes from 9.3.1.3: warnings from ghc-7.8.1 removed+ . Changes from 9.3.1.2: https as protocol added . Changes from 9.3.1.1: new parser xreadDoc
src/Text/XML/HXT/Arrow/Pickle/Xml.hs view
@@ -49,6 +49,7 @@ module Text.XML.HXT.Arrow.Pickle.Xml where +import Control.Applicative import Control.Arrow.ArrowList import Control.Arrow.ListArrows import Control.Monad ( )@@ -105,8 +106,20 @@ type UnpickleErr = (String, St) +instance Functor Unpickler where+ fmap f u = UP $ \ st ->+ let (r, st') = runUP u st in (fmap f r, st')++instance Applicative Unpickler where+ pure a = UP $ \ st -> (Right a, st)+ uf <*> ua = UP $ \ st ->+ let (f, st') = runUP uf st in+ case f of+ Left err -> (Left err, st')+ Right f' -> runUP (fmap f' ua) st'+ instance Monad Unpickler where- return x = UP $ \ st -> (Right x, st)+ return = pure u >>= f = UP $ \ st -> let (r, st') = runUP u st in case r of