From 2e4fa06c64ef02a56746c4f620aa18b5065bbaee Mon Sep 17 00:00:00 2001 From: mbays Date: Sun, 21 May 2023 00:00:00 +0000 Subject: [PATCH] hlint --- GeminiProtocol.hs | 2 +- diohsc.hs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/GeminiProtocol.hs b/GeminiProtocol.hs index 87384b2..118bebc 100644 --- a/GeminiProtocol.hs +++ b/GeminiProtocol.hs @@ -430,7 +430,7 @@ makeRequest (RequestContext (InteractionCallbacks displayInfo displayWarning _ p printIOErr = displayWarning . (:[]) . show fingerprintHex :: Fingerprint -> String - fingerprintHex (Fingerprint fp) = concat $ hexWord8 <$> BS.unpack fp + fingerprintHex (Fingerprint fp) = concatMap hexWord8 $ BS.unpack fp where hexWord8 w = let (a,b) = quotRem w 16 hex = ("0123456789abcdef" !!) . fromIntegral diff --git a/diohsc.hs b/diohsc.hs index 80032a4..e565473 100644 --- a/diohsc.hs +++ b/diohsc.hs @@ -335,7 +335,7 @@ lineClient cOpts@ClientOptions{ cOptUserDataDir = userDataDir qfs <- ignoreIOErr $ liftIO findQueueFiles forM_ qfs $ \(qfile, qname) -> enqueue qname Nothing <=< ignoreIOErr . liftIO $ - catMaybes . (queueLine <$>) <$> readFileLines qfile <* removeFile qfile + mapMaybe queueLine <$> readFileLines qfile <* removeFile qfile ignoreIOErr . liftIO $ removeDirectory queuesDir where findQueueFiles :: IO [(FilePath,String)] @@ -694,7 +694,7 @@ handleCommandLine else Just $ TargetFrom (HistoryOrigin item $ Just n) uri in resolveElemsSpecs "link" isMatch slice specs >>= (\case [] -> Left "No such link" - targs -> return targs) . catMaybes . (linkTarg <$>) + targs -> return targs) . mapMaybe linkTarg matchPattern :: String -> String -> Bool matchPattern patt = -- 2.11.4.GIT