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