packages feed

amazonka-core 1.5.0 → 1.6.0

raw patch · 45 files changed

+250/−203 lines, 45 filesdep +http-clientdep ~basedep ~bytestringdep ~conduitPVP ok

version bump matches the API change (PVP)

Dependencies added: http-client

Dependency ranges changed: base, bytestring, conduit, http-conduit, xml-conduit

API changes (from Hackage documentation)

- Network.AWS.Data.ByteString: instance Network.AWS.Data.ByteString.ToByteString Data.Time.Clock.UTC.UTCTime
- Network.AWS.Data.Log: instance Network.AWS.Data.Log.ToLog Data.Time.Clock.UTC.UTCTime
- Network.AWS.Data.Time: [Time] :: UTCTime -> Time a
- Network.AWS.Data.Time: data Time :: Format -> *
+ Network.AWS.Data.ByteString: instance Network.AWS.Data.ByteString.ToByteString Data.Time.Clock.Internal.UTCTime.UTCTime
+ Network.AWS.Data.JSON: infixr 8 .=
+ Network.AWS.Data.Log: instance Network.AWS.Data.Log.ToLog Data.Time.Clock.Internal.UTCTime.UTCTime
+ Network.AWS.Data.Path: instance Data.Semigroup.Semigroup Network.AWS.Data.Path.RawPath
+ Network.AWS.Data.Query: instance Data.Semigroup.Semigroup Network.AWS.Data.Query.QueryString
+ Network.AWS.Data.Query: stripPrefix :: ByteString -> ByteString -> Maybe ByteString
+ Network.AWS.Data.Sensitive: instance Data.Semigroup.Semigroup a => Data.Semigroup.Semigroup (Network.AWS.Data.Sensitive.Sensitive a)
+ Network.AWS.Data.Time: Time :: UTCTime -> Time
+ Network.AWS.Data.Time: [fromTime] :: Time -> UTCTime
+ Network.AWS.Data.Time: instance Network.AWS.Data.Text.FromText Network.AWS.Data.Time.POSIX
+ Network.AWS.Data.Time: newtype Time (a :: Format)
+ Network.AWS.Data.XML: instance Data.Semigroup.Semigroup Network.AWS.Data.XML.XML
+ Network.AWS.Response: receiveBytes :: (MonadResource m, MonadThrow m) => (Int -> ResponseHeaders -> ByteString -> Either String (Rs a)) -> Logger -> Service -> Proxy a -> ClientResponse -> m (Response a)
- Network.AWS.Data.Body: ChunkedBody :: !ChunkSize -> !Integer -> Source (ResourceT IO) ByteString -> ChunkedBody
+ Network.AWS.Data.Body: ChunkedBody :: !ChunkSize -> !Integer -> ConduitM () ByteString (ResourceT IO) () -> ChunkedBody
- Network.AWS.Data.Body: HashedStream :: (Digest SHA256) -> !Integer -> (Source (ResourceT IO) ByteString) -> HashedBody
+ Network.AWS.Data.Body: HashedStream :: (Digest SHA256) -> !Integer -> (ConduitM () ByteString (ResourceT IO) ()) -> HashedBody
- Network.AWS.Data.Body: RsBody :: ResumableSource (ResourceT IO) ByteString -> RsBody
+ Network.AWS.Data.Body: RsBody :: ConduitM () ByteString (ResourceT IO) () -> RsBody
- Network.AWS.Data.Body: [_chunkedBody] :: ChunkedBody -> Source (ResourceT IO) ByteString
+ Network.AWS.Data.Body: [_chunkedBody] :: ChunkedBody -> ConduitM () ByteString (ResourceT IO) ()
- Network.AWS.Data.Body: [_streamBody] :: RsBody -> ResumableSource (ResourceT IO) ByteString
+ Network.AWS.Data.Body: [_streamBody] :: RsBody -> ConduitM () ByteString (ResourceT IO) ()
- Network.AWS.Data.Body: class ToBody a where toBody = Hashed . toHashed
+ Network.AWS.Data.Body: class ToBody a
- Network.AWS.Data.Body: fuseChunks :: ChunkedBody -> Conduit ByteString (ResourceT IO) ByteString -> ChunkedBody
+ Network.AWS.Data.Body: fuseChunks :: ChunkedBody -> ConduitM ByteString ByteString (ResourceT IO) () -> ChunkedBody
- Network.AWS.Data.Body: fuseStream :: RsBody -> Conduit ByteString (ResourceT IO) ByteString -> RsBody
+ Network.AWS.Data.Body: fuseStream :: RsBody -> ConduitM ByteString ByteString (ResourceT IO) () -> RsBody
- Network.AWS.Data.ByteString: class ToByteString a where toBS = encodeUtf8 . toText
+ Network.AWS.Data.ByteString: class ToByteString a
- Network.AWS.Data.Headers: class ToHeader a where toHeader k = toHeader k . toText
+ Network.AWS.Data.Headers: class ToHeader a
- Network.AWS.Data.Headers: class ToHeaders a where toHeaders = const mempty
+ Network.AWS.Data.Headers: class ToHeaders a
- Network.AWS.Data.JSON: (.!=) :: Parser (Maybe a) -> a -> Parser a
+ Network.AWS.Data.JSON: (.!=) :: () => Parser Maybe a -> a -> Parser a
- Network.AWS.Data.JSON: (.:?) :: FromJSON a => Object -> Text -> Parser (Maybe a)
+ Network.AWS.Data.JSON: (.:?) :: FromJSON a => Object -> Text -> Parser Maybe a
- Network.AWS.Data.JSON: Object :: ~Object -> Value
+ Network.AWS.Data.JSON: Object :: !Object -> Value
- Network.AWS.Data.JSON: withObject :: String -> (Object -> Parser a) -> Value -> Parser a
+ Network.AWS.Data.JSON: withObject :: () => String -> (Object -> Parser a) -> Value -> Parser a
- Network.AWS.Data.Path: rawPath :: ToPath a => a -> Path NoEncoding
+ Network.AWS.Data.Path: rawPath :: ToPath a => a -> Path 'NoEncoding
- Network.AWS.Data.Path: type EscapedPath = Path Percent
+ Network.AWS.Data.Path: type EscapedPath = Path 'Percent
- Network.AWS.Data.Path: type RawPath = Path NoEncoding
+ Network.AWS.Data.Path: type RawPath = Path 'NoEncoding
- Network.AWS.Data.Query: class ToQuery a where toQuery = toQuery . toText
+ Network.AWS.Data.Query: class ToQuery a
- Network.AWS.Data.Time: type AWSTime = Time AWSFormat
+ Network.AWS.Data.Time: type AWSTime = Time 'AWSFormat
- Network.AWS.Data.Time: type BasicTime = Time BasicFormat
+ Network.AWS.Data.Time: type BasicTime = Time 'BasicFormat
- Network.AWS.Data.Time: type ISO8601 = Time ISO8601Format
+ Network.AWS.Data.Time: type ISO8601 = Time 'ISO8601Format
- Network.AWS.Data.Time: type POSIX = Time POSIXFormat
+ Network.AWS.Data.Time: type POSIX = Time 'POSIXFormat
- Network.AWS.Data.Time: type RFC822 = Time RFC822Format
+ Network.AWS.Data.Time: type RFC822 = Time 'RFC822Format
- Network.AWS.Response: deserialise :: MonadResource m => (LazyByteString -> Either String b) -> (Int -> ResponseHeaders -> b -> Either String (Rs a)) -> Logger -> Service -> Proxy a -> ClientResponse -> m (Response a)
+ Network.AWS.Response: deserialise :: (MonadResource m, MonadThrow m) => (LazyByteString -> Either String b) -> (Int -> ResponseHeaders -> b -> Either String (Rs a)) -> Logger -> Service -> Proxy a -> ClientResponse -> m (Response a)
- Network.AWS.Response: receiveBody :: MonadResource m => (Int -> ResponseHeaders -> RsBody -> Either String (Rs a)) -> Logger -> Service -> Proxy a -> ClientResponse -> m (Response a)
+ Network.AWS.Response: receiveBody :: (MonadResource m, MonadThrow m) => (Int -> ResponseHeaders -> RsBody -> Either String (Rs a)) -> Logger -> Service -> Proxy a -> ClientResponse -> m (Response a)
- Network.AWS.Response: receiveEmpty :: MonadResource m => (Int -> ResponseHeaders -> () -> Either String (Rs a)) -> Logger -> Service -> Proxy a -> ClientResponse -> m (Response a)
+ Network.AWS.Response: receiveEmpty :: (MonadResource m, MonadThrow m) => (Int -> ResponseHeaders -> () -> Either String (Rs a)) -> Logger -> Service -> Proxy a -> ClientResponse -> m (Response a)
- Network.AWS.Response: receiveJSON :: MonadResource m => (Int -> ResponseHeaders -> Object -> Either String (Rs a)) -> Logger -> Service -> Proxy a -> ClientResponse -> m (Response a)
+ Network.AWS.Response: receiveJSON :: (MonadResource m, MonadThrow m) => (Int -> ResponseHeaders -> Object -> Either String (Rs a)) -> Logger -> Service -> Proxy a -> ClientResponse -> m (Response a)
- Network.AWS.Response: receiveNull :: MonadResource m => Rs a -> Logger -> Service -> Proxy a -> ClientResponse -> m (Response a)
+ Network.AWS.Response: receiveNull :: (MonadResource m, MonadThrow m) => Rs a -> Logger -> Service -> Proxy a -> ClientResponse -> m (Response a)
- Network.AWS.Response: receiveXML :: MonadResource m => (Int -> ResponseHeaders -> [Node] -> Either String (Rs a)) -> Logger -> Service -> Proxy a -> ClientResponse -> m (Response a)
+ Network.AWS.Response: receiveXML :: (MonadResource m, MonadThrow m) => (Int -> ResponseHeaders -> [Node] -> Either String (Rs a)) -> Logger -> Service -> Proxy a -> ClientResponse -> m (Response a)
- Network.AWS.Response: receiveXMLWrapper :: MonadResource m => Text -> (Int -> ResponseHeaders -> [Node] -> Either String (Rs a)) -> Logger -> Service -> Proxy a -> ClientResponse -> m (Response a)
+ Network.AWS.Response: receiveXMLWrapper :: (MonadResource m, MonadThrow m) => Text -> (Int -> ResponseHeaders -> [Node] -> Either String (Rs a)) -> Logger -> Service -> Proxy a -> ClientResponse -> m (Response a)
- Network.AWS.Response: stream :: MonadResource m => (Int -> ResponseHeaders -> ResponseBody -> m (Either String (Rs a))) -> Service -> Proxy a -> ClientResponse -> m (Response a)
+ Network.AWS.Response: stream :: (MonadResource m, MonadThrow m) => (Int -> ResponseHeaders -> ResponseBody -> m (Either String (Rs a))) -> Service -> Proxy a -> ClientResponse -> m (Response a)
- Network.AWS.Types: class AWSRequest a where type Rs a :: * where {
+ Network.AWS.Types: class AWSRequest a where {
- Network.AWS.Types: class AsError a where _TransportError = _Error . _TransportError _SerializeError = _Error . _SerializeError _ServiceError = _Error . _ServiceError
+ Network.AWS.Types: class AsError a
- Network.AWS.Types: response :: (AWSRequest a, MonadResource m) => Logger -> Service -> Proxy a -> ClientResponse -> m (Response a)
+ Network.AWS.Types: response :: (AWSRequest a, MonadResource m, MonadThrow m) => Logger -> Service -> Proxy a -> ClientResponse -> m (Response a)
- Network.AWS.Types: type ResponseBody = ResumableSource (ResourceT IO) ByteString
+ Network.AWS.Types: type ResponseBody = ConduitM () ByteString (ResourceT IO) ()

Files

amazonka-core.cabal view
@@ -1,5 +1,5 @@ name:                  amazonka-core-version:               1.5.0+version:               1.6.0 synopsis:              Core data types and functionality for Amazonka libraries. homepage:              https://github.com/brendanhay/amazonka bug-reports:           https://github.com/brendanhay/amazonka/issues@@ -90,8 +90,9 @@         , deepseq              >= 1.4         , exceptions           >= 0.6         , hashable             >= 1.2-        , http-conduit         >= 2.2 && < 3-        , http-types           >= 0.8+        , http-client          >= 0.4 && < 0.6+        , http-conduit         >= 2.1.4 && < 3+        , http-types           >= 0.8 && (<0.11 || >=0.12)         , lens                 >= 4.4         , memory               >= 0.6         , mtl                  >= 2.1.3.1@@ -103,7 +104,7 @@         , transformers         >= 0.2         , transformers-compat  >= 0.3         , unordered-containers >= 0.2.7-        , xml-conduit          >= 1.2+        , xml-conduit          >= 1.7.0.1         , xml-types            >= 0.3.4      if !impl(ghc>=7.9)
src/Network/AWS/Compat/Locale.hs view
@@ -2,7 +2,7 @@  -- | -- Module      : Network.AWS.Compat.Locale--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : provisional
src/Network/AWS/Compat/Time.hs view
@@ -2,7 +2,7 @@  -- | -- Module      : Network.AWS.Compat.Time--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : provisional
src/Network/AWS/Data/Base64.hs view
@@ -4,7 +4,7 @@  -- | -- Module      : Network.AWS.Data.Base64--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : provisional
src/Network/AWS/Data/Body.hs view
@@ -12,7 +12,7 @@  -- | -- Module      : Network.AWS.Data.Body--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : provisional@@ -48,16 +48,16 @@  -- | A streaming, exception safe response body. newtype RsBody = RsBody-    { _streamBody :: ResumableSource (ResourceT IO) ByteString+    { _streamBody :: ConduitM () ByteString (ResourceT IO) ()     } -- newtype for show/orhpan instance purposes.  instance Show RsBody where-    show = const "RsBody { ResumableSource (ResourceT IO) ByteString }"+    show = const "RsBody { ConduitM () ByteString (ResourceT IO) () }"  fuseStream :: RsBody-           -> Conduit ByteString (ResourceT IO) ByteString+           -> ConduitM ByteString ByteString (ResourceT IO) ()            -> RsBody-fuseStream b f = b { _streamBody = _streamBody b $=+ f }+fuseStream b f = b { _streamBody = _streamBody b .| f }  -- | Specifies the transmitted size of the 'Transfer-Encoding' chunks. --@@ -84,7 +84,7 @@ data ChunkedBody = ChunkedBody     { _chunkedSize   :: !ChunkSize     , _chunkedLength :: !Integer-    , _chunkedBody   :: Source (ResourceT IO) ByteString+    , _chunkedBody   :: ConduitM () ByteString (ResourceT IO) ()     }  chunkedLength :: Lens' ChunkedBody Integer@@ -106,9 +106,9 @@         <> "}"  fuseChunks :: ChunkedBody-           -> Conduit ByteString (ResourceT IO) ByteString+           -> ConduitM ByteString ByteString (ResourceT IO) ()            -> ChunkedBody-fuseChunks c f = c { _chunkedBody = _chunkedBody c =$= f }+fuseChunks c f = c { _chunkedBody = _chunkedBody c .| f }  fullChunks :: ChunkedBody -> Integer fullChunks c = _chunkedLength c `div` fromIntegral (_chunkedSize c)@@ -121,7 +121,7 @@  -- | An opaque request body containing a 'SHA256' hash. data HashedBody-    = HashedStream (Digest SHA256) !Integer (Source (ResourceT IO) ByteString)+    = HashedStream (Digest SHA256) !Integer (ConduitM () ByteString (ResourceT IO) ())     | HashedBytes  (Digest SHA256) ByteString  instance Show HashedBody where
src/Network/AWS/Data/ByteString.hs view
@@ -7,7 +7,7 @@  -- | -- Module      : Network.AWS.Data.ByteString--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : provisional
src/Network/AWS/Data/Crypto.hs view
@@ -5,7 +5,7 @@  -- | -- Module      : Network.AWS.Data.Crypto--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : provisional
src/Network/AWS/Data/Headers.hs view
@@ -6,7 +6,7 @@  -- | -- Module      : Network.AWS.Data.Headers--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : provisional
src/Network/AWS/Data/JSON.hs view
@@ -2,7 +2,7 @@  -- | -- Module      : Network.AWS.Data.JSON--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : provisional
src/Network/AWS/Data/List1.hs view
@@ -7,7 +7,7 @@  -- | -- Module      : Network.AWS.Data.List1--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : provisional@@ -15,7 +15,6 @@ -- module Network.AWS.Data.List1 where -import           Control.Applicative import           Control.DeepSeq import           Control.Monad import           Data.Aeson
src/Network/AWS/Data/Log.hs view
@@ -2,12 +2,13 @@ {-# LANGUAGE LambdaCase        #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards   #-}+{-# LANGUAGE CPP               #-}  {-# OPTIONS_GHC -fsimpl-tick-factor=110 #-}  -- | -- Module      : Network.AWS.Data.Log--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : provisional@@ -120,9 +121,12 @@ instance ToLog HttpException where     build x = "[HttpException] {\n" <> build (show x) <> "\n}" +#if MIN_VERSION_http_client(0,5,0) instance ToLog HttpExceptionContent where     build x = "[HttpExceptionContent] {\n" <> build (show x) <> "\n}"+#endif + instance ToLog Request where     build x = buildLines         [  "[Client Request] {"@@ -130,7 +134,11 @@         ,  "  secure    = " <> build (secure x)         ,  "  method    = " <> build (method x)         ,  "  target    = " <> build target+#if MIN_VERSION_http_client(0,5,0)         ,  "  timeout   = " <> build (show (responseTimeout x))+#else+        ,  "  timeout   = " <> build (responseTimeout x)+#endif         ,  "  redirects = " <> build (redirectCount x)         ,  "  path      = " <> build (path            x)         ,  "  query     = " <> build (queryString     x)
src/Network/AWS/Data/Map.hs view
@@ -9,7 +9,7 @@  -- | -- Module      : Network.AWS.Data.Map--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : provisional@@ -23,7 +23,6 @@     , toQueryMap     ) where -import           Control.Applicative import           Control.DeepSeq import           Data.Aeson import           Data.Bifunctor@@ -31,14 +30,12 @@ import qualified Data.CaseInsensitive        as CI import           Data.Coerce import           Data.Data                   (Data, Typeable)-import           Data.Foldable               hiding (toList) import           Data.Hashable import           Data.HashMap.Strict         (HashMap) import qualified Data.HashMap.Strict         as Map import           Data.Maybe import           Data.Semigroup import qualified Data.Text.Encoding          as Text-import           Data.Traversable import           GHC.Exts import           GHC.Generics                (Generic) import           Network.AWS.Data.ByteString
src/Network/AWS/Data/Numeric.hs view
@@ -5,7 +5,7 @@  -- | -- Module      : Network.AWS.Data.Numeric--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : provisional@@ -18,7 +18,6 @@ import           Data.Aeson.Types import           Data.Data                   (Data, Typeable) import           Data.Hashable-import           Data.Monoid import           Data.Scientific import           GHC.Generics                (Generic) import           Network.AWS.Data.ByteString
src/Network/AWS/Data/Path.hs view
@@ -8,7 +8,7 @@  -- | -- Module      : Network.AWS.Data.Path--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : provisional@@ -31,7 +31,8 @@  import qualified Data.ByteString             as BS import qualified Data.ByteString.Char8       as BS8-import           Data.Monoid+import           Data.Monoid                 (Monoid)+import           Data.Semigroup              (Semigroup, (<>)) import           Network.AWS.Data.ByteString import           Network.AWS.Data.Text import           Network.HTTP.Types.URI@@ -65,9 +66,12 @@ type RawPath     = Path 'NoEncoding type EscapedPath = Path 'Percent +instance Semigroup RawPath where+    Raw xs <> Raw ys = Raw (xs ++ ys)+ instance Monoid RawPath where-    mempty                    = Raw []-    mappend (Raw xs) (Raw ys) = Raw (xs ++ ys)+    mempty  = Raw []+    mappend = (<>)  instance ToByteString EscapedPath where     toBS (Encoded []) = slash
src/Network/AWS/Data/Query.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP                 #-} {-# LANGUAGE DefaultSignatures   #-} {-# LANGUAGE DeriveDataTypeable  #-} {-# LANGUAGE FlexibleContexts    #-}@@ -11,7 +12,7 @@  -- | -- Module      : Network.AWS.Data.Query--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : provisional@@ -26,7 +27,8 @@ import           Data.Data import           Data.List                   (sort) import           Data.Maybe                  (fromMaybe)-import           Data.Monoid+import           Data.Monoid                 (Monoid)+import           Data.Semigroup              (Semigroup, (<>)) import           Data.String import qualified Data.Text.Encoding          as Text import           GHC.Exts@@ -41,14 +43,16 @@     | QValue (Maybe ByteString)       deriving (Eq, Show, Data, Typeable) +instance Semigroup QueryString where+  a <> b = case (a, b) of+    (QList l, QList r) -> QList (l ++ r)+    (QList l, r)       -> QList (r : l)+    (l,       QList r) -> QList (l : r)+    (l,       r)       -> QList [l, r]+ instance Monoid QueryString where     mempty = QList []--    mappend a b = case (a, b) of-        (QList l, QList r) -> QList (l ++ r)-        (QList l, r)       -> QList (r : l)-        (l,       QList r) -> QList (l : r)-        (l,       r)       -> QList [l, r]+    mappend = (<>)  instance IsString QueryString where     fromString = parseQueryString . fromString@@ -70,7 +74,16 @@         case x of             ""  -> QValue Nothing             "=" -> QValue Nothing-            _   -> QValue (Just (fromMaybe x (BS8.stripPrefix "=" x)))+            _   -> QValue (Just (fromMaybe x (stripPrefix "=" x)))++stripPrefix :: ByteString -> ByteString -> Maybe ByteString+#if MIN_VERSION_bytestring(0,10,8)+stripPrefix = BS8.stripPrefix+#else+stripPrefix bs1 bs2+   | bs1 `BS8.isPrefixOf` bs2 = Just (BS8.drop (BS8.length bs1) bs2)+   | otherwise = Nothing+#endif  -- FIXME: use Builder instance ToByteString QueryString where
src/Network/AWS/Data/Sensitive.hs view
@@ -5,7 +5,7 @@  -- | -- Module      : Network.AWS.Data.Sensitive--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : provisional@@ -16,7 +16,8 @@ import           Control.DeepSeq import           Data.Data                   (Data, Typeable) import           Data.Hashable-import           Data.Monoid+import           Data.Monoid                 (Monoid)+import           Data.Semigroup              (Semigroup) import           Data.String  import           GHC.Generics                (Generic)@@ -36,6 +37,7 @@         ( Eq         , Ord         , IsString+        , Semigroup         , Monoid         , Data         , Typeable
src/Network/AWS/Data/Text.hs view
@@ -6,7 +6,7 @@  -- | -- Module      : Network.AWS.Data.Text--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : provisional@@ -28,7 +28,6 @@     , showText     ) where -import           Control.Applicative import           Data.Attoparsec.Text              (Parser) import qualified Data.Attoparsec.Text              as A import           Data.ByteString                   (ByteString)
src/Network/AWS/Data/Time.hs view
@@ -3,17 +3,17 @@ {-# LANGUAGE DeriveGeneric              #-} {-# LANGUAGE FlexibleContexts           #-} {-# LANGUAGE FlexibleInstances          #-}-{-# LANGUAGE GADTs                      #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE KindSignatures             #-} {-# LANGUAGE LambdaCase                 #-} {-# LANGUAGE OverloadedStrings          #-} {-# LANGUAGE ScopedTypeVariables        #-} {-# LANGUAGE StandaloneDeriving         #-}+{-# LANGUAGE ViewPatterns               #-}  -- | -- Module      : Network.AWS.Data.Time--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : provisional@@ -43,7 +43,6 @@ import qualified Data.ByteString.Char8       as BS import           Data.Data                   (Data, Typeable) import           Data.Hashable-import           Data.Monoid import           Data.Scientific import           Data.Tagged import qualified Data.Text                   as Text@@ -74,16 +73,8 @@ deriving instance Typeable 'AWSFormat deriving instance Typeable 'POSIXFormat -data Time :: Format -> * where-    Time :: UTCTime -> Time a-      deriving (Data, Typeable, Generic)--deriving instance Eq   (Time a)-deriving instance Ord  (Time a)-deriving instance Read (Time a)-deriving instance Show (Time a)--instance NFData (Time a)+newtype Time (a :: Format) = Time { fromTime :: UTCTime }+    deriving (Show, Read, Eq, Ord, Data, Typeable, Generic, NFData)  instance Hashable (Time a) where     hashWithSalt salt (Time (UTCTime (ModifiedJulianDay d) t)) =@@ -91,10 +82,10 @@              `hashWithSalt` toRational t  _Time :: Iso' (Time a) UTCTime-_Time = iso (\(Time t) -> t) Time+_Time = iso fromTime Time  convert :: Time a -> Time b-convert (Time t) = Time t+convert = Time . fromTime  type RFC822    = Time 'RFC822Format type ISO8601   = Time 'ISO8601Format@@ -110,36 +101,41 @@ instance TimeFormat BasicTime where format = Tagged "%Y%m%d" instance TimeFormat AWSTime   where format = Tagged "%Y%m%dT%H%M%SZ" -instance FromText BasicTime where parser = parseFormattedTime-instance FromText AWSTime   where parser = parseFormattedTime+instance FromText BasicTime where parser = parseUnixTimestamp <|> parseFormattedTime+instance FromText AWSTime   where parser = parseUnixTimestamp <|> parseFormattedTime+instance FromText RFC822    where parser = parseUnixTimestamp <|> parseFormattedTime+instance FromText ISO8601   where parser = parseUnixTimestamp <|> parseFormattedTime+instance FromText POSIX     where parser = parseUnixTimestamp <|> parseFormattedTime -instance FromText RFC822 where-    parser = (convert :: ISO8601 -> RFC822) <$> parseFormattedTime-         <|> parseFormattedTime+parseFormattedTime :: Parser (Time a)+parseFormattedTime = do+    s <- Text.unpack <$> AText.takeText -instance FromText ISO8601 where-    parser = (convert :: RFC822 -> ISO8601) <$> parseFormattedTime-         <|> parseFormattedTime-         -- Deprecated, but ensure compatibility with examples until further investigation can be done-         <|> parseFormattedTime' (Tagged $ iso8601DateFormat (Just "%X%Q%Z"))+    let parse :: Tagged b String -> Parser (Time a)+        parse (untag -> fmt) =+            case parseTime defaultTimeLocale fmt s of+                Just x  -> pure (Time x)+                Nothing ->+                    fail ( "Unable to parse Time format "+                        ++ show fmt+                        ++ " from "+                        ++ show s+                         ) -parseFormattedTime :: forall a. TimeFormat (Time a) => Parser (Time a)-parseFormattedTime = parseFormattedTime' format+    parse (format :: Tagged RFC822 String)+        <|> parse (format :: Tagged ISO8601   String)+        <|> parse (format :: Tagged BasicTime String)+        <|> parse (format :: Tagged AWSTime   String)+        -- Deprecated ISO8601 format exhibited in the AWS-supplied examples.+        <|> parse (Tagged $ iso8601DateFormat (Just "%X%Q%Z"))+        -- Exhaustive Failure+        <|> fail ("Failure parsing Time from value: " ++ show s) -parseFormattedTime' :: Tagged (Time a) String -> Parser (Time a)-parseFormattedTime' f = do-    x <- Text.unpack <$> AText.takeText-    p (parseTime defaultTimeLocale (untag f) x) x-  where-    p :: Maybe UTCTime -> String -> Parser (Time a)-    p (Just x) _ = return (Time x)-    p Nothing  s = fail $ mconcat-        [ "Failure parsing Date format "-        , untag f-        , " from value: '"-        , s-        , "'"-        ]+parseUnixTimestamp :: Parser (Time a)+parseUnixTimestamp =+    Time . posixSecondsToUTCTime . realToFrac+        <$> AText.double <* AText.endOfInput+        <|> fail "Failure parsing Unix Timestamp"  instance ToText RFC822    where toText = Text.pack . renderFormattedTime instance ToText ISO8601   where toText = Text.pack . renderFormattedTime
src/Network/AWS/Data/XML.hs view
@@ -8,7 +8,7 @@  -- | -- Module      : Network.AWS.Data.XML--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : provisional@@ -16,14 +16,14 @@ -- module Network.AWS.Data.XML where -import           Control.Applicative import           Control.Monad  import           Data.Bifunctor import           Data.Conduit import           Data.Conduit.Lazy           (lazyConsume) import           Data.Maybe-import           Data.Monoid+import           Data.Monoid                 (Monoid)+import           Data.Semigroup              (Semigroup, (<>)) import           Data.Traversable            (traverse) import           Data.XML.Types              (Event (..)) @@ -77,9 +77,9 @@ --    by the process.' encodeXML :: ToElement a => a -> LazyByteString encodeXML x = LBS.fromChunks . unsafePerformIO . lazyConsume-     $  Conduit.sourceList (toEvents doc)-    =$= Conduit.map rename-    =$= Stream.renderBytes def+     $ Conduit.sourceList (toEvents doc)+    .| Conduit.map rename+    .| Stream.renderBytes def   where     doc = toXMLDocument $ Document         { documentRoot     = root@@ -147,14 +147,17 @@     | XMany [(Name, Text)] [Node]       deriving (Show) -instance Monoid XML where-    mempty              = XNull-    mappend XNull XNull = XNull-    mappend a     XNull = a-    mappend XNull b     = b-    mappend a     b     =+instance Semigroup XML where+    XNull <> XNull = XNull+    a     <> XNull = a+    XNull <> b     = b+    a     <> b     =         XMany (listXMLAttributes a <> listXMLAttributes b)               (listXMLNodes      a <> listXMLNodes      b)++instance Monoid XML where+    mempty = XNull+    mappend = (<>)  listXMLNodes :: XML -> [Node] listXMLNodes = \case
src/Network/AWS/Endpoint.hs view
@@ -5,7 +5,7 @@  -- | -- Module      : Network.AWS.Types--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : provisional
src/Network/AWS/Error.hs view
@@ -1,10 +1,11 @@ {-# LANGUAGE LambdaCase        #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ViewPatterns      #-}+{-# LANGUAGE CPP               #-}  -- | -- Module      : Network.AWS.Error--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : provisional@@ -63,10 +64,14 @@ httpStatus = _Error . f   where     f g = \case+#if MIN_VERSION_http_client(0,5,0)         TransportError (HttpExceptionRequest rq (StatusCodeException rs b))             -> (\x -> TransportError (HttpExceptionRequest rq (StatusCodeException (rs { responseStatus = x }) b)))                <$> g (responseStatus rs)-+#else+        TransportError (StatusCodeException s h c)+            -> TransportError <$> (StatusCodeException <$> g s <*> pure h <*> pure c)+#endif         TransportError e             -> pure (TransportError e) 
src/Network/AWS/Lens.hs view
@@ -1,6 +1,6 @@ -- | -- Module      : Network.AWS.Lens--- Copyright   : (c) 2013-2017 Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Copyright   : (c) 2013-2018 Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : provisional
src/Network/AWS/Pager.hs view
@@ -3,7 +3,7 @@  -- | -- Module      : Network.AWS.Pager--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : provisional@@ -19,7 +19,6 @@ import           Control.Applicative import           Data.HashMap.Strict   (HashMap) import qualified Data.HashMap.Strict   as Map-import           Data.List.NonEmpty    (NonEmpty) import           Data.Maybe            (isJust, fromMaybe) import           Data.Text             (Text) import           Network.AWS.Data.Text (ToText (..))
src/Network/AWS/Prelude.hs view
@@ -1,6 +1,6 @@ -- | -- Module      : Network.AWS.Prelude--- Copyright   : (c) 2013-2017 Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Copyright   : (c) 2013-2018 Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : provisional@@ -11,43 +11,44 @@     , module Export     ) where -import           Control.Applicative         as Export (Applicative, pure)-import           Control.Applicative         as Export ((<$>), (<*>), (<|>))-import           Control.DeepSeq             as Export (NFData)-import           Data.Data                   as Export (Data, Typeable)-import           Data.Foldable               as Export (Foldable)-import           Data.Hashable               as Export (Hashable)-import           Data.HashMap.Strict         as Export (HashMap)-import           Data.List.NonEmpty          as Export (NonEmpty (..))-import           Data.Maybe                  as Export-import           Data.Monoid                 as Export (First, mconcat, mempty)-import           Data.Monoid                 as Export ((<>))-import           GHC.Generics                as Export (Generic)-import           Network.HTTP.Types.Status   as Export (Status (..))-import           Network.HTTP.Types.URI      as Export (urlDecode, urlEncode)-import           Numeric.Natural             as Export (Natural)+import Control.Applicative       as Export (Applicative, pure)+import Control.Applicative       as Export ((<$>), (<*>), (<|>))+import Control.DeepSeq           as Export (NFData)+import Data.Data                 as Export (Data, Typeable)+import Data.Foldable             as Export (Foldable)+import Data.Hashable             as Export (Hashable)+import Data.HashMap.Strict       as Export (HashMap)+import Data.List.NonEmpty        as Export (NonEmpty (..))+import Data.Maybe                as Export+import Data.Monoid               as Export (First, mconcat, mempty)+import Data.Monoid               as Export ((<>))+import GHC.Generics              as Export (Generic)+import Network.HTTP.Types.Status as Export (Status (..))+import Network.HTTP.Types.URI    as Export (urlDecode, urlEncode)+import Numeric.Natural           as Export (Natural) -import           Network.AWS.Data.Base64     as Export-import           Network.AWS.Data.Body       as Export-import           Network.AWS.Data.ByteString as Export-import           Network.AWS.Data.Crypto     as Export hiding (Base (..))-import           Network.AWS.Data.Headers    as Export-import           Network.AWS.Data.JSON       as Export-import           Network.AWS.Data.List1      as Export-import           Network.AWS.Data.Map        as Export-import           Network.AWS.Data.Numeric    as Export-import           Network.AWS.Data.Path       as Export-import           Network.AWS.Data.Query      as Export-import           Network.AWS.Data.Sensitive  as Export-import           Network.AWS.Data.Text       as Export-import           Network.AWS.Data.Time       as Export-import           Network.AWS.Data.XML        as Export-import           Network.AWS.Endpoint        as Export-import           Network.AWS.Error           as Export-import           Network.AWS.Types           as Export hiding (Algorithm,-                                                        Endpoint, LogLevel (..),-                                                        Seconds, Signer,-                                                        serviceEndpoint)+import Network.AWS.Data.Base64     as Export+import Network.AWS.Data.Body       as Export+import Network.AWS.Data.ByteString as Export+import Network.AWS.Data.Crypto     as Export hiding (Base (..))+import Network.AWS.Data.Headers    as Export+import Network.AWS.Data.JSON       as Export+import Network.AWS.Data.List1      as Export+import Network.AWS.Data.Map        as Export+import Network.AWS.Data.Numeric    as Export+import Network.AWS.Data.Path       as Export+import Network.AWS.Data.Query      as Export+import Network.AWS.Data.Sensitive  as Export+import Network.AWS.Data.Text       as Export+import Network.AWS.Data.Time       as Export (AWSTime, BasicTime, ISO8601,+                                              POSIX, RFC822, Time (..), UTCTime,+                                              _Time)+import Network.AWS.Data.XML        as Export+import Network.AWS.Endpoint        as Export+import Network.AWS.Error           as Export+import Network.AWS.Types           as Export hiding (Algorithm, Endpoint,+                                              LogLevel (..), Seconds, Signer,+                                              serviceEndpoint)  infixl 7 .!@ 
src/Network/AWS/Request.hs view
@@ -4,7 +4,7 @@  -- | -- Module      : Network.AWS.Request--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : provisional
src/Network/AWS/Response.hs view
@@ -6,7 +6,7 @@  -- | -- Module      : Network.AWS.Response--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : provisional@@ -14,26 +14,31 @@ -- module Network.AWS.Response where -import           Control.Applicative          (pure)-import           Control.Monad.Catch-import           Control.Monad.IO.Class-import           Control.Monad.Trans.Resource-import           Data.Aeson-import           Data.Conduit-import qualified Data.Conduit.Binary          as Conduit-import           Data.Monoid-import           Data.Proxy-import           Data.Text                    (Text)-import           Network.AWS.Data.Body-import           Network.AWS.Data.ByteString-import           Network.AWS.Data.Log-import           Network.AWS.Data.XML-import           Network.AWS.Types-import           Network.HTTP.Conduit         hiding (Proxy, Request, Response)-import           Network.HTTP.Types-import           Text.XML                     (Node)+import Control.Applicative          (pure)+import Control.Monad.Catch+import Control.Monad.IO.Class+import Control.Monad.Trans.Resource -receiveNull :: MonadResource m+import Data.Aeson+import Data.Conduit+import Data.Monoid+import Data.Proxy+import Data.Text    (Text)++import Network.AWS.Data.Body+import Network.AWS.Data.ByteString+import Network.AWS.Data.Log+import Network.AWS.Data.XML+import Network.AWS.Types+import Network.HTTP.Conduit        hiding (Proxy, Request, Response)+import Network.HTTP.Types++import Text.XML (Node)++import qualified Data.ByteString.Lazy as LBS+import qualified Data.Conduit.Binary  as Conduit++receiveNull :: (MonadResource m, MonadThrow m)             => Rs a             -> Logger             -> Service@@ -41,9 +46,9 @@             -> ClientResponse             -> m (Response a) receiveNull rs _ = stream $ \_ _ x ->-    liftResourceT (x $$+- pure (Right rs))+    liftResourceT (x `connect` pure (Right rs)) -receiveEmpty :: MonadResource m+receiveEmpty :: (MonadResource m, MonadThrow m)              => (Int -> ResponseHeaders -> () -> Either String (Rs a))              -> Logger              -> Service@@ -51,9 +56,9 @@              -> ClientResponse              -> m (Response a) receiveEmpty f _ = stream $ \s h x ->-    liftResourceT (x $$+- pure (f s h ()))+    liftResourceT (x `connect` pure (f s h ())) -receiveXMLWrapper :: MonadResource m+receiveXMLWrapper :: (MonadResource m, MonadThrow m)                   => Text                   -> (Int -> ResponseHeaders -> [Node] -> Either String (Rs a))                   -> Logger@@ -63,7 +68,7 @@                   -> m (Response a) receiveXMLWrapper n f = receiveXML (\s h x -> x .@ n >>= f s h) -receiveXML :: MonadResource m+receiveXML :: (MonadResource m, MonadThrow m)            => (Int -> ResponseHeaders -> [Node] -> Either String (Rs a))            -> Logger            -> Service@@ -72,7 +77,7 @@            -> m (Response a) receiveXML = deserialise decodeXML -receiveJSON :: MonadResource m+receiveJSON :: (MonadResource m, MonadThrow m)             => (Int -> ResponseHeaders -> Object -> Either String (Rs a))             -> Logger             -> Service@@ -81,7 +86,16 @@             -> m (Response a) receiveJSON = deserialise eitherDecode' -receiveBody :: MonadResource m+receiveBytes :: (MonadResource m, MonadThrow m)+             => (Int -> ResponseHeaders -> ByteString -> Either String (Rs a))+             -> Logger+             -> Service+             -> Proxy a+             -> ClientResponse+             -> m (Response a)+receiveBytes = deserialise (Right . LBS.toStrict)++receiveBody :: (MonadResource m, MonadThrow m)             => (Int -> ResponseHeaders -> RsBody -> Either String (Rs a))             -> Logger             -> Service@@ -91,7 +105,7 @@ receiveBody f _ = stream $ \s h x -> pure (f s h (RsBody x))  -- | Deserialise an entire response body, such as an XML or JSON payload.-deserialise :: MonadResource m+deserialise :: (MonadResource m, MonadThrow m)             => (LazyByteString -> Either String b)             -> (Int -> ResponseHeaders -> b -> Either String (Rs a))             -> Logger@@ -114,7 +128,7 @@                     SerializeError' _svcAbbrev s (Just b) e  -- | Stream a raw response body, such as an S3 object payload.-stream :: MonadResource m+stream :: (MonadResource m, MonadThrow m)        => (Int -> ResponseHeaders -> ResponseBody -> m (Either String (Rs a)))        -> Service        -> Proxy a@@ -133,4 +147,4 @@                    e  sinkLBS :: MonadResource m => ResponseBody -> m LazyByteString-sinkLBS bdy = liftResourceT (bdy $$+- Conduit.sinkLbs)+sinkLBS bdy = liftResourceT (bdy `connect` Conduit.sinkLbs)
src/Network/AWS/Sign/V2.hs view
@@ -6,7 +6,7 @@  -- | -- Module      : Network.AWS.Sign.V2--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : provisional@@ -16,7 +16,6 @@     ( v2     ) where -import           Control.Applicative import qualified Data.ByteString.Char8       as BS8 import           Data.Monoid import           Data.Time
src/Network/AWS/Sign/V4.hs view
@@ -11,7 +11,7 @@  -- | -- Module      : Network.AWS.Sign.V4--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : provisional@@ -22,7 +22,6 @@     , v4     ) where -import           Control.Applicative import qualified Data.CaseInsensitive        as CI import           Data.Monoid import           Network.AWS.Data.Body
src/Network/AWS/Sign/V4/Base.hs view
@@ -11,15 +11,13 @@  -- | -- Module      : Network.AWS.Sign.V4.Base--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : provisional -- Portability : non-portable (GHC extensions) -- module Network.AWS.Sign.V4.Base where--import           Control.Applicative  import           Data.Bifunctor import           Data.Function               (on)
src/Network/AWS/Sign/V4/Chunked.hs view
@@ -14,7 +14,7 @@  -- | -- Module      : Network.AWS.Sign.V4.Chunked--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : provisional@@ -24,8 +24,6 @@     ( chunked     ) where -import Control.Applicative- import Data.ByteString.Builder import Data.Conduit import Data.Maybe@@ -62,7 +60,7 @@      body = Chunked (c `fuseChunks` sign (metaSignature meta)) -    sign :: Monad m => Signature -> Conduit ByteString m ByteString+    sign :: Monad m => Signature -> ConduitM ByteString ByteString m ()     sign prev = do         mx <- await         let next = chunkSignature prev (fromMaybe mempty mx)
src/Network/AWS/Types.hs view
@@ -8,10 +8,11 @@ {-# LANGUAGE RankNTypes                 #-} {-# LANGUAGE RecordWildCards            #-} {-# LANGUAGE TypeFamilies               #-}+{-# LANGUAGE CPP                        #-}  -- | -- Module      : Network.AWS.Types--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : provisional@@ -168,6 +169,10 @@ import qualified Data.Text            as Text import qualified Network.HTTP.Conduit as Client +#if ! MIN_VERSION_http_client(0,4,30)+import           Text.XML                     (def)+#endif+ -- | A convenience alias to avoid type ambiguity. type ClientRequest = Client.Request @@ -175,7 +180,7 @@ type ClientResponse = Client.Response ResponseBody  -- | A convenience alias encapsulating the common 'Response' body.-type ResponseBody = ResumableSource (ResourceT IO) ByteString+type ResponseBody = ConduitM () ByteString (ResourceT IO) ()  -- | Abbreviated service name. newtype Abbrev = Abbrev Text@@ -451,15 +456,24 @@ -- | Construct a 'ClientRequest' using common parameters such as TLS and prevent -- throwing errors when receiving erroneous status codes in respones. clientRequest :: Endpoint -> Maybe Seconds -> ClientRequest-clientRequest e t = Client.defaultRequest+clientRequest e t =+#if MIN_VERSION_http_client(0,4,30)+  Client.defaultRequest+#else+  def+#endif     { Client.secure          = _endpointSecure e     , Client.host            = _endpointHost   e     , Client.port            = _endpointPort   e     , Client.redirectCount   = 0     , Client.responseTimeout =+#if MIN_VERSION_http_client(0,5,0)         case t of             Nothing -> Client.responseTimeoutNone             Just x  -> Client.responseTimeoutMicro (microseconds x)+#else+        microseconds <$> t+#endif     }  -- | An unsigned request.@@ -504,7 +518,7 @@     type Rs a :: *      request  :: a -> Request a-    response :: MonadResource m+    response :: (MonadResource m, MonadThrow m)              => Logger              -> Service              -> Proxy a -- For injectivity reasons.
src/Network/AWS/Waiter.hs view
@@ -5,7 +5,7 @@  -- | -- Module      : Network.AWS.Waiter--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : This Source Code Form is subject to the terms of -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : provisional@@ -32,7 +32,6 @@     , nonEmptyText     ) where -import           Control.Applicative import           Control.Lens                (Fold, allOf, anyOf, to, (^..),                                               (^?)) import           Data.Maybe
test/Main.hs view
@@ -2,7 +2,7 @@  -- | -- Module      : Main--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : experimental
test/Test/AWS/Arbitrary.hs view
@@ -6,7 +6,7 @@  -- | -- Module      : Test.AWS.Arbitrary--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : experimental
test/Test/AWS/Data/Base64.hs view
@@ -2,7 +2,7 @@  -- | -- Module      : Test.AWS.Data.Base64--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : experimental
test/Test/AWS/Data/List.hs view
@@ -2,7 +2,7 @@  -- | -- Module      : Test.AWS.Data.List--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : experimental
test/Test/AWS/Data/Maybe.hs view
@@ -2,7 +2,7 @@  -- | -- Module      : Test.AWS.Data.Maybe--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : experimental
test/Test/AWS/Data/Numeric.hs view
@@ -3,7 +3,7 @@  -- | -- Module      : Test.AWS.Data.Numeric--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : experimental
test/Test/AWS/Data/Path.hs view
@@ -2,7 +2,7 @@  -- | -- Module      : Test.AWS.Data.Path--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : experimental
test/Test/AWS/Data/Query.hs view
@@ -2,7 +2,7 @@  -- | -- Module      : Test.AWS.Query.List--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : experimental
test/Test/AWS/Data/Time.hs view
@@ -4,7 +4,7 @@  -- | -- Module      : Test.AWS.Data.Time--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : experimental
test/Test/AWS/Error.hs view
@@ -3,7 +3,7 @@  -- | -- Module      : Test.AWS.Error--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : experimental
test/Test/AWS/Sign/V4.hs view
@@ -3,7 +3,7 @@  -- | -- Module      : Test.AWS.Sign.V$--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : experimental
test/Test/AWS/Sign/V4/Chunked.hs view
@@ -4,7 +4,7 @@  -- | -- Module      : Test.AWS.Sign.V$--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : experimental
test/Test/AWS/Util.hs view
@@ -2,7 +2,7 @@  -- | -- Module      : Test.AWS.Util--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : experimental