dbgtrace takes a level parameter
This commit is contained in:
parent
427953728e
commit
2d7a1904b4
@ -181,11 +181,11 @@ tracePrettyAtIO lvl lbl x = liftIO $ tracePrettyAt lvl lbl x `seq` return ()
|
|||||||
-- tracePrettyAtM lvl lbl x = tracePrettyAt lvl lbl x `seq` return x
|
-- tracePrettyAtM lvl lbl x = tracePrettyAt lvl lbl x `seq` return x
|
||||||
|
|
||||||
-- | print this string to the console before evaluating the expression,
|
-- | print this string to the console before evaluating the expression,
|
||||||
-- if the global debug level is non-zero. Uses unsafePerformIO.
|
-- if the global debug level is at or above the specified level. Uses unsafePerformIO.
|
||||||
dbgtrace :: String -> a -> a
|
dbgtrace :: Int -> String -> a -> a
|
||||||
dbgtrace
|
dbgtrace level
|
||||||
| debugLevel > 0 = trace
|
| debugLevel >= level = trace
|
||||||
| otherwise = flip const
|
| otherwise = flip const
|
||||||
|
|
||||||
-- | Print a showable value to the console, with a message, if the
|
-- | Print a showable value to the console, with a message, if the
|
||||||
-- debug level is at or above the specified level (uses
|
-- debug level is at or above the specified level (uses
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user