#1142 make sendStatusJSON fully polymorphic in its return type, since it never returns

This commit is contained in:
Ross MacLeod 2016-01-12 11:32:20 -05:00
parent d4a907d4e8
commit 1fb53dfa9e

View File

@ -580,7 +580,7 @@ sendResponseStatus s = handlerError . HCContent s . toTypedContent
-- | Bypass remaining handler code and output the given JSON with the given
-- status code.
sendStatusJSON :: (MonadHandler m, ToJSON a) => H.Status -> a -> m a
sendStatusJSON :: (MonadHandler m, ToJSON c) => H.Status -> c -> m a
sendStatusJSON s v = sendResponseStatus s (toJSON v)
-- | Send a 201 "Created" response with the given route as the Location