amazonka-core 1.3.5.1 → 1.3.6
raw patch · 5 files changed
+12/−5 lines, 5 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Network.AWS.Data.XML: maybeElement :: ToElement a => a -> Maybe Element
Files
- amazonka-core.cabal +1/−1
- src/Network/AWS/Data/Body.hs +1/−2
- src/Network/AWS/Data/XML.hs +8/−0
- src/Network/AWS/Prelude.hs +1/−1
- src/Network/AWS/Request.hs +1/−1
amazonka-core.cabal view
@@ -1,5 +1,5 @@ name: amazonka-core-version: 1.3.5.1+version: 1.3.6 synopsis: Core data types and functionality for Amazonka libraries. homepage: https://github.com/brendanhay/amazonka bug-reports: https://github.com/brendanhay/amazonka/issues
src/Network/AWS/Data/Body.hs view
@@ -51,8 +51,7 @@ -- | A streaming, exception safe response body. newtype RsBody = RsBody { _streamBody :: ResumableSource (ResourceT IO) ByteString- }--- newtype for show/orhpan instance purposes.+ } -- newtype for show/orhpan instance purposes. instance Show RsBody where show = const "RsBody { ResumableSource (ResourceT IO) ByteString }"
src/Network/AWS/Data/XML.hs view
@@ -119,6 +119,14 @@ instance ToElement Element where toElement = id +-- | Convert to an 'Element', only if the resulting element contains @> 0@ nodes.+maybeElement :: ToElement a => a -> Maybe Element+maybeElement x =+ case toElement x of+ e@(Element _ _ ns)+ | null ns -> Nothing+ | otherwise -> Just e+ -- | Provides a way to make the operators for ToXML instance -- declaration be consistent WRT to single nodes or lists of nodes. data XML
src/Network/AWS/Prelude.hs view
@@ -19,7 +19,7 @@ iso, lens, mapping, prism, to, _Just, _last) import Control.Lens as Export (( # ), (&), (.~), (<&>),- (^.), (^?))+ (^.), (^?), (^?)) import Data.Data as Export (Data, Typeable) import Data.Foldable as Export (Foldable) import Data.Hashable as Export (Hashable)
src/Network/AWS/Request.hs view
@@ -102,7 +102,7 @@ putXML :: (ToRequest a, ToElement a) => Service -> a -> Request a putXML s x = defaultRequest s x & rqMethod .~ PUT- & rqBody .~ toBody (toElement x)+ & rqBody .~ maybe "" toBody (maybeElement x) putJSON :: (ToRequest a, ToJSON a) => Service -> a -> Request a putJSON s x = defaultRequest s x