pTrace remains in code
The pTrace function pretty prints the trace message given as its first argument, before returning the second argument as its result.
For example, this returns the value of f x but first outputs the message.
pTrace ("calling f with x = " ++ show x) (f x)The pTrace function should only be used for debugging, or for monitoring execution. The function is not referentially transparent: its type indicates that it is a pure function but it has the side effect of outputting the trace message.