blob: 73afc7f205dd9a71f163978b4b6fae506026cd22 (
plain)
1
2
3
4
5
6
7
8
9
10
|
{-# LANGUAGE ScopedTypeVariables #-}
import Control.Exception
import Control.Monad
import GHC.Conc
main = join $ atomically $ do
catchSTM
(throwSTM ThreadKilled `orElse` return (putStrLn "wtf"))
(\(e::SomeException) -> return (putStrLn "ok"))
|