summaryrefslogtreecommitdiff
path: root/libraries/base/tests/T7787.hs
blob: 883f4a9b96fbb31d97c096ac28c758e2caee47ac (plain)
1
2
3
4
5
6
7
8
import Control.Concurrent.MVar
import Control.Exception

main = do
  mv <- newMVar 'x'
  e <- try (modifyMVar mv $ \_ -> return undefined)
  let _ = e :: Either SomeException ()
  withMVar mv print -- should not hang