From 693d6ac4b7601ef0bc19cfd3ca2cd1022d3d14a1 Mon Sep 17 00:00:00 2001 From: Ivan Gromakovskii Date: Wed, 27 Sep 2023 23:00:08 +0200 Subject: [PATCH] [Chore] Fix a complation error due to new Universum Problem: retryAfterInfo doesn't compile because the type of readMaybe got more polymorphic in Universum. Solution: specify explicitly that the argument is Text. N.B. In the previous version it was String (due to the old type of readMaybe), but Text is generally preferable, so we're changing it. --- src/Xrefcheck/Verify.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Xrefcheck/Verify.hs b/src/Xrefcheck/Verify.hs index 7468ae12..e8c4fcbc 100644 --- a/src/Xrefcheck/Verify.hs +++ b/src/Xrefcheck/Verify.hs @@ -768,7 +768,9 @@ checkExternalResource followed config@Config{..} link other -> throwError $ ExternalResourceSomeError $ show other where retryAfterInfo :: Response a -> Maybe RetryAfter - retryAfterInfo = readMaybe . decodeUtf8 <=< L.lookup hRetryAfter . responseHeaders + retryAfterInfo = + readMaybe @_ @Text . decodeUtf8 <=< + L.lookup hRetryAfter . responseHeaders checkFtp :: URI -> Bool -> ExceptT VerifyError IO () checkFtp uri secure = do