From ebc266022cbe1b23846bb58824e03e910134eb19 Mon Sep 17 00:00:00 2001 From: "Julian K. Arni" Date: Thu, 19 Feb 2015 19:18:08 +0100 Subject: [PATCH] Small tweaks for servant-server --- src/Servant/API.hs | 3 ++- src/Servant/API/ContentTypes.hs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Servant/API.hs b/src/Servant/API.hs index ed271466..b13b4630 100644 --- a/src/Servant/API.hs +++ b/src/Servant/API.hs @@ -47,7 +47,8 @@ module Servant.API ( import Servant.API.Alternative ( (:<|>)(..) ) import Servant.API.Capture ( Capture ) import Servant.API.ContentTypes ( HTML, XML, JSON, JavaScript, CSS - , PlainText, OctetStream ) + , PlainText, OctetStream, MimeRender(..) + , MimeUnrender(..)) import Servant.API.Delete ( Delete ) import Servant.API.Get ( Get ) import Servant.API.Header ( Header ) diff --git a/src/Servant/API/ContentTypes.hs b/src/Servant/API/ContentTypes.hs index e0ae0e74..d141f494 100644 --- a/src/Servant/API/ContentTypes.hs +++ b/src/Servant/API/ContentTypes.hs @@ -110,7 +110,7 @@ instance ( AllMimeRender ctyps a, IsNonEmpty ctyps class Accept ctype => MimeUnrender ctype a where fromByteString :: Proxy ctype -> ByteString -> Either String a -class AllCTUnrender list a where +class (IsNonEmpty list) => AllCTUnrender list a where handleCTypeH :: Proxy list -> ByteString -- Content-Type header -> ByteString -- Request body