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.
This commit is contained in:
patrick brisbin 2020-12-01 11:49:29 -05:00
parent 95dc598d4b
commit 24acd4e3b7
No known key found for this signature in database
GPG Key ID: 20299C6982D938FB

View File

@ -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)