on master help sign in
Remove excessively fancy type (broke older GHCs)
commitd07b8fa88f6cd145bbcfc9235b664223a142fe55 authorTom McLaughlin <pyro777@gmail.com> dateTue 25 Jun 2019, 02:59 (7 years ago) parentaac8c61
1 file changed+1−2
auto-update/test/Control/DebounceSpec.hs+1−2
auto-update/test/Control/DebounceSpec.hs+1−2
@@ -6,7 +6,6 @@ import Control.Debounce
66import qualified Control.Debounce.Internal as DI
77import Control.Monad
88import Control.Monad.Catch
9−import Control.Monad.IO.Class
109import Control.Retry
1110import Data.IORef
1211import Test.HUnit.Lang
@@ -143,7 +142,7 @@ waitForBatonToBeTaken :: MVar () -> IO ()
143142waitForBatonToBeTaken baton = waitUntil 5 $ tryReadMVar baton >>= (`shouldBe` Nothing)
144143
145144-- | Wait up to n seconds for an actual to complete without throwing an HUnitFailure
146−waitUntil :: (MonadIO m, MonadMask m) => Int -> m a -> m ()
145+waitUntil :: Int -> IO a -> IO ()
147146waitUntil n action = recovering policy [handler] (\_status -> void action)
148147 where policy = constantDelay 1000 <> limitRetries (n * 1000) -- 1ms * n * 1000 tries = n seconds
149148 handler _status = Handler (\(HUnitFailure {}) -> return True)