From 62ea1887117ad285e899671473f47457e4952703 Mon Sep 17 00:00:00 2001 From: Michael Walker Date: Sat, 26 Nov 2022 22:40:08 +0000 Subject: [PATCH] Fix lint failure --- dejafu-tests/lib/Integration/Regressions.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dejafu-tests/lib/Integration/Regressions.hs b/dejafu-tests/lib/Integration/Regressions.hs index a612bcb..c8c1b24 100644 --- a/dejafu-tests/lib/Integration/Regressions.hs +++ b/dejafu-tests/lib/Integration/Regressions.hs @@ -6,6 +6,7 @@ import Test.DejaFu (exceptionsAlways, gives') import Control.Concurrent.Classy import Control.Exception (AsyncException(..)) +import Control.Monad (void) import qualified Control.Monad.Catch as E import System.Random (mkStdGen) @@ -45,10 +46,10 @@ tests = toTestList (\_ -> pure ()) , 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 ()) s <- newEmptyMVar - t <- mask $ \restore -> fork (try (restore (act s)) >> pure ()) + t <- mask $ \restore -> fork (void (try (restore (act s)))) killThread t tryReadMVar s