From 3956958b7ab29faf565acc8746fb059314fb90a2 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 1 May 2013 14:37:45 +0300 Subject: [PATCH] Better Show HandlerContents --- yesod-core/Yesod/Core/Types.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/yesod-core/Yesod/Core/Types.hs b/yesod-core/Yesod/Core/Types.hs index fbe0e6bb..49c68d4a 100644 --- a/yesod-core/Yesod/Core/Types.hs +++ b/yesod-core/Yesod/Core/Types.hs @@ -346,7 +346,12 @@ data HandlerContents = deriving Typeable instance Show HandlerContents where - show _ = "Cannot show a HandlerContents" + show (HCContent status (TypedContent t _)) = "HCContent " ++ show (status, t) + show (HCError e) = "HCError " ++ show e + show (HCSendFile ct fp mfp) = "HCSendFile " ++ show (ct, fp, mfp) + show (HCRedirect s t) = "HCRedirect " ++ show (s, t) + show (HCCreated t) = "HCCreated " ++ show t + show (HCWai _) = "HCWai" instance Exception HandlerContents -- Instances for WidgetT