hs_try_putmvar example in user guide is wrong
The example of using hs_try_putmvar
in the user guide has a type error: https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/ffi.html#:~:text=cap%20%3C%2D%20threadCapability%20%3D%3C%3C%20myThreadId
It assumes threadCapability
has type ThreadId -> IO Int
but it has type ThreadId -> IO (Int, Bool)
.
We should update the line to discard the Bool
. It looks like this error has existed for 7 years since its introduction in 454033b5
The test does the right thing: https://gitlab.haskell.org/ghc/ghc/-/blob/master/testsuite/tests/concurrent/should_run/hs_try_putmvar001.hs#L23