<div dir="ltr">ThreadId has a Show instance that makes uses the FFI to turn a ThreadId to a CInt:<div><br></div><div> instance Show ThreadId where<br> showsPrec d t =<br> showString "ThreadId " .<br> showsPrec d (getThreadId (id2TSO t))<br><br> foreign import ccall unsafe "rts_getThreadId" getThreadId :: ThreadId# -> CInt</div><div><br></div><div>Can getThreadId be exported? This would make it possible to write a Hashable instance for ThreadId, and it would make it possible to use a ThreadId to index into an array (with modulus of course).</div><div><br><div class="gmail_signature">-Andrew Thaddeus Martin</div>
</div></div>