diff --git a/servant/servant.cabal b/servant/servant.cabal index 2a8fb84f..389ff87d 100644 --- a/servant/servant.cabal +++ b/servant/servant.cabal @@ -109,6 +109,7 @@ library , attoparsec >= 0.13.2.2 && < 0.14 , bifunctors >= 5.5.3 && < 5.6 , case-insensitive >= 1.2.0.11 && < 1.3 + , deepseq >= 1.4.2.0 && < 1.5 , http-media >= 0.7.1.3 && < 0.8 , http-types >= 0.12.2 && < 0.13 , mmorph >= 1.1.2 && < 1.2 diff --git a/servant/src/Servant/API/ContentTypes.hs b/servant/src/Servant/API/ContentTypes.hs index 5df6063e..145ecfb5 100644 --- a/servant/src/Servant/API/ContentTypes.hs +++ b/servant/src/Servant/API/ContentTypes.hs @@ -71,6 +71,8 @@ module Servant.API.ContentTypes import Control.Arrow (left) import Control.Monad.Compat +import Control.DeepSeq + (NFData) import Data.Aeson (FromJSON (..), ToJSON (..), encode) import Data.Aeson.Parser @@ -361,6 +363,8 @@ instance MimeRender OctetStream BS.ByteString where data NoContent = NoContent deriving (Show, Eq, Read, Generic) +instance NFData NoContent + -------------------------------------------------------------------------- -- * MimeUnrender Instances