
#14360: traceM documentation not clear (and possibly incorrect) -------------------------------------+------------------------------------- Reporter: saurabhnanda | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Core | Version: 8.0.2 Libraries | Keywords: docs | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- 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"
-- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14360 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler