module Debug.Trace.Tools where import Debug.Trace -- | inline output a variable traceVal msg x = trace (if msg /= "" then msg ++ " " ++ show x else show x) x -- | conditional tracing traceIf cnd msg x = if cnd then trace msg x else x -- | conditional inline tracing traceIfVal cnd msg x = if cnd then traceVal msg x else x