ltrace, labelled trace

This commit is contained in:
Simon Michael 2009-03-15 03:58:43 +00:00
parent 931144a12d
commit 0693723aee

View File

@ -215,6 +215,10 @@ showforest = concatMap showtree
strace :: Show a => a -> a
strace a = trace (show a) a
-- | labelled trace - like strace, with a newline and a label prepended
ltrace :: Show a => String -> a -> a
ltrace l a = trace ("\n" ++ l ++ ": " ++ show a) a
-- testing
assertequal e a = assertEqual "" e a