
22 Aug
2006
22 Aug
'06
5:53 p.m.
On 8/22/06, Frederik Eaton
The 'Show' instance for ThreadId produces stuff like "ThreadId 1" - not very concise. Is there an simple way to turn it into an Int or Integer so I can call 'show' on that? Usually ThreadId's are turned into strings for the purpose of logging, in which case one really only wants the numeric part.
With GHC, you can do it the same way as it's done in base lib (maybe not the simple you'd like, and might break between versions): http://darcs.haskell.org/packages/base/GHC/Conc.lhs I do agree that the "ThreadId " part isn't that usefull. Attached the trivial patch to remove it from the Show instance, in case others agree. Best regards, --Esa