mirror of
https://github.com/barrucadu/dejafu.git
synced 2024-11-22 12:15:39 +03:00
Fix lint failure
This commit is contained in:
parent
4c33222521
commit
62ea188711
@ -6,6 +6,7 @@ import Test.DejaFu (exceptionsAlways, gives')
|
|||||||
|
|
||||||
import Control.Concurrent.Classy
|
import Control.Concurrent.Classy
|
||||||
import Control.Exception (AsyncException(..))
|
import Control.Exception (AsyncException(..))
|
||||||
|
import Control.Monad (void)
|
||||||
import qualified Control.Monad.Catch as E
|
import qualified Control.Monad.Catch as E
|
||||||
import System.Random (mkStdGen)
|
import System.Random (mkStdGen)
|
||||||
|
|
||||||
@ -45,10 +46,10 @@ tests = toTestList
|
|||||||
(\_ -> pure ())
|
(\_ -> pure ())
|
||||||
|
|
||||||
, djfu "https://github.com/barrucadu/dejafu/issues/161" (gives' [Just (), Nothing]) $ do
|
, djfu "https://github.com/barrucadu/dejafu/issues/161" (gives' [Just (), Nothing]) $ do
|
||||||
let try a = (a >> pure ()) `E.catch` (\(_ :: E.SomeException) -> pure ())
|
let try a = void a `E.catch` (\(_ :: E.SomeException) -> pure ())
|
||||||
let act s = uninterruptibleMask_ (putMVar s ())
|
let act s = uninterruptibleMask_ (putMVar s ())
|
||||||
s <- newEmptyMVar
|
s <- newEmptyMVar
|
||||||
t <- mask $ \restore -> fork (try (restore (act s)) >> pure ())
|
t <- mask $ \restore -> fork (void (try (restore (act s))))
|
||||||
killThread t
|
killThread t
|
||||||
tryReadMVar s
|
tryReadMVar s
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user