From 24acd4e3b72240725b5ffd02f62636f6ab818c21 Mon Sep 17 00:00:00 2001 From: patrick brisbin Date: Tue, 1 Dec 2020 11:49:29 -0500 Subject: [PATCH] Add missing HasCallStack Even though functions that use this one all have HasCallStack, the fact that this function itself doesn't means that all errors are reported as from this line anyway: Failures: ./Yesod/Test.hs:1571:28: 1) ... This should correct that. --- yesod-test/Yesod/Test.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yesod-test/Yesod/Test.hs b/yesod-test/Yesod/Test.hs index 6c319234..3262b208 100644 --- a/yesod-test/Yesod/Test.hs +++ b/yesod-test/Yesod/Test.hs @@ -1567,7 +1567,7 @@ parseSetCookies :: [H.Header] -> [Cookie.SetCookie] parseSetCookies headers = map (Cookie.parseSetCookie . snd) $ DL.filter (("Set-Cookie"==) . fst) $ headers -- Yes, just a shortcut -failure :: (MonadIO a) => T.Text -> a b +failure :: (HasCallStack, MonadIO a) => T.Text -> a b failure reason = (liftIO $ HUnit.assertFailure $ T.unpack reason) >> error "" type TestApp site = (site, Middleware)