summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrendanHay <>2016-05-09 19:12:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2016-05-09 19:12:00 (GMT)
commit80ebc4ccf2c6b40c3c20a452213efc1fe890c50f (patch)
tree912cb553f8dc4934422985cbad2a36a5d7014eb3
parent1806f06f3834752ce1e98a2cbe988a23bd4e09e9 (diff)
version 1.4.11.4.1
-rw-r--r--amazonka-core.cabal3
-rw-r--r--src/Network/AWS/Data/Base64.hs2
-rw-r--r--src/Network/AWS/Data/List1.hs3
-rw-r--r--src/Network/AWS/Data/Log.hs5
-rw-r--r--src/Network/AWS/Data/Map.hs2
-rw-r--r--src/Network/AWS/Data/Numeric.hs4
-rw-r--r--src/Network/AWS/Data/Sensitive.hs2
-rw-r--r--src/Network/AWS/Data/Time.hs3
-rw-r--r--src/Network/AWS/Prelude.hs1
-rw-r--r--src/Network/AWS/Sign/V4.hs2
-rw-r--r--src/Network/AWS/Types.hs5
11 files changed, 28 insertions, 4 deletions
diff --git a/amazonka-core.cabal b/amazonka-core.cabal
index 5200670..32f6b6a 100644
--- a/amazonka-core.cabal
+++ b/amazonka-core.cabal
@@ -1,5 +1,5 @@
name: amazonka-core
-version: 1.4.0
+version: 1.4.1
synopsis: Core data types and functionality for Amazonka libraries.
homepage: https://github.com/brendanhay/amazonka
bug-reports: https://github.com/brendanhay/amazonka/issues
@@ -80,6 +80,7 @@ library
, conduit >= 1.1
, conduit-extra >= 1.1
, cryptonite >= 0.4
+ , deepseq >= 1.4
, exceptions >= 0.6
, hashable >= 1.2
, http-conduit >= 2.1.4
diff --git a/src/Network/AWS/Data/Base64.hs b/src/Network/AWS/Data/Base64.hs
index f2310e4..f0c3f5f 100644
--- a/src/Network/AWS/Data/Base64.hs
+++ b/src/Network/AWS/Data/Base64.hs
@@ -15,6 +15,7 @@ module Network.AWS.Data.Base64
, _Base64
) where
+import Control.DeepSeq
import Data.Aeson.Types
import qualified Data.Attoparsec.Text as AText
import qualified Data.ByteArray.Encoding as BA
@@ -38,6 +39,7 @@ newtype Base64 = Base64 { unBase64 :: ByteString }
deriving (Eq, Read, Ord, Data, Typeable, Generic)
instance Hashable Base64
+instance NFData Base64
_Base64 :: Iso' Base64 ByteString
_Base64 = iso unBase64 Base64
diff --git a/src/Network/AWS/Data/List1.hs b/src/Network/AWS/Data/List1.hs
index d91c3a8..82fecc1 100644
--- a/src/Network/AWS/Data/List1.hs
+++ b/src/Network/AWS/Data/List1.hs
@@ -16,6 +16,7 @@
module Network.AWS.Data.List1 where
import Control.Applicative
+import Control.DeepSeq
import Control.Monad
import Data.Aeson
import Data.Coerce
@@ -51,6 +52,8 @@ newtype List1 a = List1 { toNonEmpty :: NonEmpty a }
, Generic
)
+instance NFData a => NFData (List1 a)
+
_List1 :: (Coercible a b, Coercible b a) => Iso' (List1 a) (NonEmpty b)
_List1 = iso (coerce . toNonEmpty) (List1 . coerce)
diff --git a/src/Network/AWS/Data/Log.hs b/src/Network/AWS/Data/Log.hs
index 882a62a..286c50d 100644
--- a/src/Network/AWS/Data/Log.hs
+++ b/src/Network/AWS/Data/Log.hs
@@ -100,9 +100,8 @@ instance ToLog HttpVersion where
instance ToLog RequestBody where
build = \case
- RequestBodyBuilder n _ -> " <msger:" <> build n <> ">"
+ RequestBodyBuilder n _ -> " <builder:" <> build n <> ">"
RequestBodyStream n _ -> " <stream:" <> build n <> ">"
- RequestBodyStreamChunked _ -> " <chunked>"
RequestBodyLBS lbs
| n <= 4096 -> build lbs
@@ -116,6 +115,8 @@ instance ToLog RequestBody where
where
n = BS.length bs
+ _ -> " <chunked>"
+
instance ToLog HttpException where
build x = "[HttpException] {\n" <> build (show x) <> "\n}"
diff --git a/src/Network/AWS/Data/Map.hs b/src/Network/AWS/Data/Map.hs
index ed11740..892467d 100644
--- a/src/Network/AWS/Data/Map.hs
+++ b/src/Network/AWS/Data/Map.hs
@@ -23,6 +23,7 @@ module Network.AWS.Data.Map
, toQueryMap
) where
+import Control.DeepSeq
import Control.Applicative
import Data.Aeson
import Data.Bifunctor
@@ -70,6 +71,7 @@ _Map :: (Coercible a b, Coercible b a) => Iso' (Map k a) (HashMap k b)
_Map = iso (coerce . toMap) (Map . coerce)
instance (Hashable k, Hashable v) => Hashable (Map k v)
+instance (NFData k, NFData v) => NFData (Map k v)
instance (Hashable k, Eq k) => IsList (Map k v) where
type Item (Map k v) = (k, v)
diff --git a/src/Network/AWS/Data/Numeric.hs b/src/Network/AWS/Data/Numeric.hs
index 24078f4..1e5c326 100644
--- a/src/Network/AWS/Data/Numeric.hs
+++ b/src/Network/AWS/Data/Numeric.hs
@@ -13,6 +13,7 @@
--
module Network.AWS.Data.Numeric where
+import Control.DeepSeq
import Control.Monad
import Data.Aeson.Types
import Data.Data (Data, Typeable)
@@ -54,6 +55,9 @@ _Nat = iso unNat Nat
instance Hashable Nat where
hashWithSalt salt (Nat n) = hashWithSalt salt (toInteger n)
+instance NFData Nat where
+ rnf = rnf . toInteger . unNat
+
instance FromJSON Nat where
parseJSON = parseJSON >=> go
where
diff --git a/src/Network/AWS/Data/Sensitive.hs b/src/Network/AWS/Data/Sensitive.hs
index fecb214..477fd1d 100644
--- a/src/Network/AWS/Data/Sensitive.hs
+++ b/src/Network/AWS/Data/Sensitive.hs
@@ -12,6 +12,7 @@
--
module Network.AWS.Data.Sensitive where
+import Control.DeepSeq
import Data.Data (Data, Typeable)
import Data.Hashable
import Data.Monoid
@@ -49,6 +50,7 @@ instance Show (Sensitive a) where
show = const "******"
instance Hashable a => Hashable (Sensitive a)
+instance NFData a => NFData (Sensitive a)
_Sensitive :: Iso' (Sensitive a) a
_Sensitive = iso desensitise Sensitive
diff --git a/src/Network/AWS/Data/Time.hs b/src/Network/AWS/Data/Time.hs
index d98fb1f..2b1805a 100644
--- a/src/Network/AWS/Data/Time.hs
+++ b/src/Network/AWS/Data/Time.hs
@@ -35,6 +35,7 @@ module Network.AWS.Data.Time
) where
import Control.Applicative
+import Control.DeepSeq
import Data.Aeson
import Data.Attoparsec.Text (Parser)
import qualified Data.Attoparsec.Text as AText
@@ -81,6 +82,8 @@ deriving instance Ord (Time a)
deriving instance Read (Time a)
deriving instance Show (Time a)
+instance NFData (Time a)
+
instance Hashable (Time a) where
hashWithSalt salt (Time (UTCTime (ModifiedJulianDay d) t)) =
salt `hashWithSalt` d
diff --git a/src/Network/AWS/Prelude.hs b/src/Network/AWS/Prelude.hs
index 7640cce..9f35f05 100644
--- a/src/Network/AWS/Prelude.hs
+++ b/src/Network/AWS/Prelude.hs
@@ -13,6 +13,7 @@ module Network.AWS.Prelude
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)
diff --git a/src/Network/AWS/Sign/V4.hs b/src/Network/AWS/Sign/V4.hs
index f1677ff..f232634 100644
--- a/src/Network/AWS/Sign/V4.hs
+++ b/src/Network/AWS/Sign/V4.hs
@@ -30,7 +30,7 @@ import Network.AWS.Data.ByteString
import Network.AWS.Data.Headers
import Network.AWS.Data.Query
import Network.AWS.Data.Time
-import Network.AWS.Lens ((%~), (.~), (<>~))
+import Network.AWS.Lens ((%~), (<>~))
import Network.AWS.Request
import Network.AWS.Sign.V4.Base
import Network.AWS.Sign.V4.Chunked
diff --git a/src/Network/AWS/Types.hs b/src/Network/AWS/Types.hs
index 93841a8..89ff35a 100644
--- a/src/Network/AWS/Types.hs
+++ b/src/Network/AWS/Types.hs
@@ -122,6 +122,7 @@ module Network.AWS.Types
import Control.Applicative
import Control.Concurrent (ThreadId)
+import Control.DeepSeq
import Control.Exception
import Control.Monad.IO.Class
import Control.Monad.Trans.Resource
@@ -572,6 +573,7 @@ data Region
deriving (Eq, Ord, Read, Show, Data, Typeable, Generic)
instance Hashable Region
+instance NFData Region
instance FromText Region where
parser = takeLowerText >>= \case
@@ -632,6 +634,9 @@ newtype Seconds = Seconds Int
, ToText
)
+instance Hashable Seconds
+instance NFData Seconds
+
instance ToLog Seconds where
build s = build (seconds s) <> "s"