From e7655d380a98884d1a904b233ddeb7421cf96001 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Tue, 27 Nov 2018 16:41:31 +0000 Subject: [PATCH] Add NoContent instance for NFData --- servant/servant.cabal | 1 + servant/src/Servant/API/ContentTypes.hs | 4 ++++ 2 files changed, 5 insertions(+) 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