[GHC] #14360: traceM documentation not clear (and possibly incorrect)

#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

#14360: traceM documentation not clear (and possibly incorrect) -------------------------------------+------------------------------------- Reporter: saurabhnanda | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Core Libraries | Version: 8.0.2 Resolution: | Keywords: docs Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): Can you suggest some better language? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14360#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC