From dd77ac4c0a2137cd955ce213d3e35f725dcaccca Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Fri, 19 Feb 2016 22:54:38 -0800 Subject: [PATCH] lib: note debugLevel gotcha in GHCI --- hledger-lib/Hledger/Utils/Debug.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hledger-lib/Hledger/Utils/Debug.hs b/hledger-lib/Hledger/Utils/Debug.hs index ab8324afd..928c63da4 100644 --- a/hledger-lib/Hledger/Utils/Debug.hs +++ b/hledger-lib/Hledger/Utils/Debug.hs @@ -70,8 +70,10 @@ ptrace msg = do -- @--debug@ command line flag sets it to 1, or @--debug=N@ sets it to -- a higher value (note: not @--debug N@ for some reason). This uses -- unsafePerformIO and can be accessed from anywhere and before normal --- command-line processing. After command-line processing, it is also --- available as the @debug_@ field of 'Hledger.Cli.CliOptions.CliOpts'. +-- command-line processing. When running with :main in GHCI, you must +-- touch and reload this module to see the effect of a new --debug option. +-- After command-line processing, it is also available as the @debug_@ +-- field of 'Hledger.Cli.CliOptions.CliOpts'. -- {-# OPTIONS_GHC -fno-cse #-} -- {-# NOINLINE debugLevel #-} debugLevel :: Int