Skip to content

traceM documentation not clear (and possibly incorrect)

The code-example and the accompanying text at https://www.stackage.org/haddock/lts-9.0/base-4.9.1.0/Debug-Trace.html#v:traceM are out of sync. Also, it's not very clear what the following line means:

Note that the application of traceM is not an action in the Applicative context, as traceIO is in the IO type.

I realised something was wrong when, during a refactor, I ended up with the equivalent of the following loop, which caused a thread to completely freeze and become unresponsive:

forever $ traceShowM "something"

Trac metadata
Trac field Value
Version 8.0.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Core Libraries
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information