From 00e2a8a3271783bcebaa8b4b167bcfdc0f247332 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Wed, 7 Dec 2016 07:52:10 -0800 Subject: [PATCH] lib: note a problem with dbg*IO --- hledger-lib/Hledger/Utils/Debug.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hledger-lib/Hledger/Utils/Debug.hs b/hledger-lib/Hledger/Utils/Debug.hs index 3da3daf9f..6c65135b3 100644 --- a/hledger-lib/Hledger/Utils/Debug.hs +++ b/hledger-lib/Hledger/Utils/Debug.hs @@ -117,6 +117,9 @@ dbg9 = tracePrettyAt 9 -- | Convenience aliases for tracePrettyAtIO. -- Like dbg, but convenient to insert in an IO monad. +-- XXX These have a bug; they should use traceIO, not trace, +-- otherwise GHC can occasionally over-optimise +-- (cf lpaste a few days ago where it killed/blocked a child thread). dbg0IO :: (MonadIO m, Show a) => String -> a -> m () dbg0IO = tracePrettyAtIO 0