From 1fb53dfa9ef99b97b2f981c76391c58a0b7ea1a2 Mon Sep 17 00:00:00 2001 From: Ross MacLeod Date: Tue, 12 Jan 2016 11:32:20 -0500 Subject: [PATCH] #1142 make sendStatusJSON fully polymorphic in its return type, since it never returns --- yesod-core/Yesod/Core/Handler.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yesod-core/Yesod/Core/Handler.hs b/yesod-core/Yesod/Core/Handler.hs index 33cb57f7..1bd2695e 100644 --- a/yesod-core/Yesod/Core/Handler.hs +++ b/yesod-core/Yesod/Core/Handler.hs @@ -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