File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -167,7 +167,9 @@ newtype AcceptHeader = AcceptHeader BS.ByteString
167167-- >
168168-- > type MyAPI = "path" :> Get '[MyContentType] Int
169169class Accept ctype => MimeRender ctype a where
170- mimeRender :: Proxy ctype -> a -> ByteString
170+ type MimeRenderType a :: Type
171+ type MimeRenderType a = ByteString
172+ mimeRender :: Proxy ctype -> a -> MimeRenderType a
171173
172174class AllMime list => AllCTRender (list :: [Type ]) a where
173175 -- If the Accept header can be matched, returns (Just) a tuple of the
@@ -213,7 +215,9 @@ instance
213215--
214216-- >>> type MyAPI = "path" :> ReqBody '[MyContentType] Int :> Get '[JSON] Int
215217class Accept ctype => MimeUnrender ctype a where
216- mimeUnrender :: Proxy ctype -> ByteString -> Either String a
218+ type MimeUnrenderType a :: Type
219+ type MimeUnrenderType a = ByteString
220+ mimeUnrender :: Proxy ctype -> MimeUnrenderType a -> Either String a
217221 mimeUnrender p = mimeUnrenderWithType p (contentType p)
218222
219223 -- | Variant which is given the actual 'M.MediaType' provided by the other party.
You can’t perform that action at this time.
0 commit comments