From 577ff7902ccbb9d9392cfa638d1d61f0477416c8 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Wed, 2 Apr 2014 09:30:59 -0700 Subject: [PATCH] dbgAtM, monadic version of dbgAt --- hledger-lib/Hledger/Utils.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hledger-lib/Hledger/Utils.hs b/hledger-lib/Hledger/Utils.hs index 9808abaa1..55d7adf0d 100644 --- a/hledger-lib/Hledger/Utils.hs +++ b/hledger-lib/Hledger/Utils.hs @@ -430,6 +430,9 @@ dbg = dbgppshow 1 dbgAt :: Show a => Int -> String -> a -> a dbgAt lvl = dbgppshow lvl +dbgAtM :: Show a => Int -> String -> a -> IO () +dbgAtM lvl lbl x = dbgAt lvl lbl x `seq` return () + -- | Print a showable value to the console, with a message, if the -- debug level is at or above the specified level (uses -- unsafePerformIO).