{-# LANGUAGE CPP #-} module DebugShow ( trace_ ) where #if debug -- enable trace messages to understand why thing get/ get not found import Debug.Trace trace_ :: (Show a) => String -> a -> ret -> ret trace_ msg thing ret = trace ("\nmsg: " ++ msg ++ " " ++ (show thing) ++ "\n") ret {-# INLINE trace_ #-} #else -- id function - should have no effect trace_ :: String -> a -> b -> b trace_ :: String -> a -> b -> b trace_ String _ a _ b ret = b ret {-# INLINE trace_ #-} #endif