@@ -395,9 +395,15 @@ instance (MonadIO m) => KatipContext (KatipContextT m) where
395 localKatipNamespace f (KatipContextT m) = KatipContextT $ local (\s -> s { ltsNamespace = f (ltsNamespace s)}) m
395 localKatipNamespace f (KatipContextT m) = KatipContextT $ local (\s -> s { ltsNamespace = f (ltsNamespace s)}) m
397instance MonadUnliftIO m => MonadUnliftIO (KatipContextT m) where
397instance MonadUnliftIO m => MonadUnliftIO (KatipContextT m) where
398+#if MIN_VERSION_unliftio_core(0, 2, 0)
399+ withRunInIO inner = KatipContextT $ ReaderT $ \lts -> withRunInIO $ \run ->
400+ inner (run . runKatipContextT (ltsLogEnv lts) (ltsContext lts) (ltsNamespace lts))
398 askUnliftIO = KatipContextT $
402 askUnliftIO = KatipContextT $
399− withUnliftIO $ \u ->
403+ withUnliftIO $ \u ->
400− pure (UnliftIO (unliftIO u . unKatipContextT))
404+ pure (UnliftIO (unliftIO u . unKatipContextT))
402#if MIN_VERSION_base(4, 9, 0)
408#if MIN_VERSION_base(4, 9, 0)
403instance MF.MonadFail m => MF.MonadFail (KatipContextT m) where
409instance MF.MonadFail m => MF.MonadFail (KatipContextT m) where
@@ -482,9 +488,15 @@ instance MonadBaseControl b m => MonadBaseControl b (NoLoggingT m) where
482 restoreM = NoLoggingT . restoreM
488 restoreM = NoLoggingT . restoreM
484instance MonadUnliftIO m => MonadUnliftIO (NoLoggingT m) where
490instance MonadUnliftIO m => MonadUnliftIO (NoLoggingT m) where
491+#if MIN_VERSION_unliftio_core(0, 2, 0)
492+ withRunInIO inner = NoLoggingT $ withRunInIO $ \run ->
493+ inner (run . runNoLoggingT)
485 askUnliftIO = NoLoggingT $
495 askUnliftIO = NoLoggingT $
486− withUnliftIO $ \u ->
496+ withUnliftIO $ \u ->
487− pure (UnliftIO (unliftIO u . runNoLoggingT))
497+ pure (UnliftIO (unliftIO u . runNoLoggingT))
489instance MonadIO m => Katip (NoLoggingT m) where
501instance MonadIO m => Katip (NoLoggingT m) where
490 getLogEnv = liftIO (initLogEnv "NoLoggingT" "no-logging")
502 getLogEnv = liftIO (initLogEnv "NoLoggingT" "no-logging")