From f2ab2fe0f7041679f861010f14f144dce17417bb Mon Sep 17 00:00:00 2001 From: Mats Rauhala Date: Wed, 2 Apr 2025 13:34:28 +0300 Subject: [PATCH] Remove redundant imports --- src/MyLib.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/MyLib.hs b/src/MyLib.hs index bfff40d..50cd5e0 100644 --- a/src/MyLib.hs +++ b/src/MyLib.hs @@ -17,18 +17,18 @@ import Data.Text qualified as T import Data.Text.Strict.Lens (utf8) import Katip qualified as K import M +import Network.Wai.Handler.Warp (defaultSettings, runSettings, setPort) import Options.Generic (Generic, ParseRecord (..), getRecord, unDefValue, unHelpful, type (), type ()) import Pipes (Pipe, for, lift, runEffect, (>->)) import Pipes.Prelude qualified as P +import Server (Health (..), app) import Text.Pandoc (PandocError, def, readHtml, runPure, writeMarkdown) -import UnliftIO (MonadUnliftIO, liftIO, atomicModifyIORef') +import UnliftIO (MonadUnliftIO, liftIO) import UnliftIO.Async (mapConcurrently_) import UnliftIO.Concurrent (threadDelay) import UnliftIO.Exception (displayException, isAsyncException) +import UnliftIO.IORef (IORef, newIORef, writeIORef) import Wallabag -import Network.Wai.Handler.Warp (setPort, setLogger, defaultSettings, runSettings) -import Server (app, Health (..)) -import UnliftIO.IORef (newIORef, IORef, writeIORef) data Options = Quick {verbose :: Bool} @@ -98,8 +98,8 @@ runDaemon diagnosticsPort credsPath sev = initialS (Just credsPath) sev $ \s -> reportError health e | isAsyncException e = throw e | otherwise = do - writeIORef health Degraded - K.logFM K.ErrorS $ K.ls $ displayException e + writeIORef health Degraded + K.logFM K.ErrorS $ K.ls $ displayException e handle :: (Exception e, MonadUnliftIO m) => (e -> m a) -> m a -> m a handle = flip catch