Merge pull request #1090 from domenkozar/nocontent-nfdata

Add NoContent instance for NFData
This commit is contained in:
Oleg Grenrus 2018-11-27 19:48:59 +02:00 committed by GitHub
commit 7bbcfb21e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View file

@ -109,6 +109,7 @@ library
, attoparsec >= 0.13.2.2 && < 0.14 , attoparsec >= 0.13.2.2 && < 0.14
, bifunctors >= 5.5.3 && < 5.6 , bifunctors >= 5.5.3 && < 5.6
, case-insensitive >= 1.2.0.11 && < 1.3 , case-insensitive >= 1.2.0.11 && < 1.3
, deepseq >= 1.4.2.0 && < 1.5
, http-media >= 0.7.1.3 && < 0.8 , http-media >= 0.7.1.3 && < 0.8
, http-types >= 0.12.2 && < 0.13 , http-types >= 0.12.2 && < 0.13
, mmorph >= 1.1.2 && < 1.2 , mmorph >= 1.1.2 && < 1.2

View file

@ -71,6 +71,8 @@ module Servant.API.ContentTypes
import Control.Arrow import Control.Arrow
(left) (left)
import Control.Monad.Compat import Control.Monad.Compat
import Control.DeepSeq
(NFData)
import Data.Aeson import Data.Aeson
(FromJSON (..), ToJSON (..), encode) (FromJSON (..), ToJSON (..), encode)
import Data.Aeson.Parser import Data.Aeson.Parser
@ -361,6 +363,8 @@ instance MimeRender OctetStream BS.ByteString where
data NoContent = NoContent data NoContent = NoContent
deriving (Show, Eq, Read, Generic) deriving (Show, Eq, Read, Generic)
instance NFData NoContent
-------------------------------------------------------------------------- --------------------------------------------------------------------------
-- * MimeUnrender Instances -- * MimeUnrender Instances