more debug utils, dbg0/dbg1/dbg2

This commit is contained in:
Simon Michael 2014-04-13 11:05:20 -07:00
parent 52957f48eb
commit c93b19cb10

View File

@ -423,7 +423,16 @@ debugLevel = case snd $ break (=="--debug") args of
-- | Print a message and a showable value to the console if the global
-- debug level is non-zero. Uses unsafePerformIO.
dbg :: Show a => String -> a -> a
dbg = dbgppshow 1
dbg = dbg1
dbg0 :: Show a => String -> a -> a
dbg0 = dbgAt 0
dbg1 :: Show a => String -> a -> a
dbg1 = dbgAt 1
dbg2 :: Show a => String -> a -> a
dbg2 = dbgAt 2
-- | Print a message and a showable value to the console if the global
-- debug level is at or above the specified level. Uses unsafePerformIO.