From c7a7323f54fbcb08ebd4a2af0d7c2e54e3cdd062 Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> Date: Mon, 20 Nov 2023 12:15:09 +0000 Subject: [PATCH] list imports --- src/Simplex/Messaging/Util.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Simplex/Messaging/Util.hs b/src/Simplex/Messaging/Util.hs index 373a19172..3143427ca 100644 --- a/src/Simplex/Messaging/Util.hs +++ b/src/Simplex/Messaging/Util.hs @@ -18,8 +18,8 @@ import Data.Text (Text) import qualified Data.Text as T import Data.Text.Encoding (decodeUtf8With) import Data.Time (NominalDiffTime) -import GHC.Conc -import UnliftIO hiding (handle) +import GHC.Conc (labelThread, myThreadId, threadDelay) +import UnliftIO import qualified UnliftIO.Exception as UE raceAny_ :: MonadUnliftIO m => [m a] -> m () @@ -98,7 +98,7 @@ tryAllErrors err action = tryError action `UE.catch` (pure . Left . err) {-# INLINE tryAllErrors #-} catchAllErrors :: (MonadUnliftIO m, MonadError e m) => (E.SomeException -> e) -> m a -> (e -> m a) -> m a -catchAllErrors err action handle = tryAllErrors err action >>= either handle pure +catchAllErrors err action handler = tryAllErrors err action >>= either handler pure {-# INLINE catchAllErrors #-} catchThrow :: (MonadUnliftIO m, MonadError e m) => m a -> (E.SomeException -> e) -> m a