From 72a7aaa39e7552970f466e712e1f7ef91aeb03c8 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Thu, 10 Jun 2021 08:14:16 -0400 Subject: Upgrade to nixos-21.05 Getting me closer to the latest GHC. This release also includes my own packages that I submitted some time ago. GHCJS is not present in 21.05 for some reason, but I think it's back in master, so I might do another upgrade soon, but for now I just disabled my GHCJS support. I'm not really using it anyway. I also had to bring it string-quote, update nixos-mailserver, and a few other things. --- Biz/Devalloc.hs | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'Biz/Devalloc.hs') diff --git a/Biz/Devalloc.hs b/Biz/Devalloc.hs index 32fa7f9..b920241 100644 --- a/Biz/Devalloc.hs +++ b/Biz/Devalloc.hs @@ -73,7 +73,6 @@ import qualified Clay.Font import qualified Clay.Render as Clay import qualified Control.Concurrent.Async as Async import qualified Control.Exception as Exception -import Control.Monad ((>=>)) import Crypto.JOSE.JWK (JWK) import Data.Acid (makeAcidic) import qualified Data.Acid as Acid @@ -81,7 +80,7 @@ import qualified Data.Acid.Advanced as Acid import qualified Data.Acid.Local as Acid import qualified Data.Aeson as Aeson import qualified Data.ByteString.Lazy as LBS -import Data.Data (Data, Typeable) +import Data.Data (Data) import Data.IxSet (Indexable (..), IxSet, ixFun, ixSet, (&&&), (@=)) import qualified Data.IxSet as IxSet import qualified Data.List as List @@ -1018,7 +1017,7 @@ guardAdmin = \case requiredScopes :: Set Text requiredScopes = Set.fromList ["repo"] -guardScope :: Text -> Handler () +guardScope :: Text -> Servant.Handler () guardScope = Text.split (== ',') .> Set.fromList @@ -1052,7 +1051,7 @@ htmlApp cooks kp cfg jwk oAuthArgs = Just code -> do OAuthResponse {..} <- githubOauth oAuthArgs code |> liftIO guardScope scope - let warn :: Text -> Handler a + let warn :: Text -> Servant.Handler a warn msg = Log.warn [msg] >> Log.br @@ -1094,7 +1093,7 @@ htmlApp cooks kp cfg jwk oAuthArgs = (GitHub.currentUserReposR GitHub.RepoPublicityAll GitHub.FetchAll) |> liftIO +> \case - Left err -> throwError err502 {errBody = show err} + Left err -> throwError err502 {errBody = str <| (show err :: String)} Right repos -> pure <. App.Html <| SelectRepo user repos, getAnalyses = guardAuth @@ -1642,14 +1641,7 @@ analyze keep askedBy activeAuthors url bareRepo repoPrivate = do ] /> String.lines authors <- traverse (authorsFor bareRepo) tree :: IO [[(Text, Text, Text)]] - let authorMap = - zipWith - ( \path authors_ -> - (path, authors_) - ) - tree - authors :: - [(FilePath, [(Text, Text, Text)])] + let authorMap = zip tree authors :: [(FilePath, [(Text, Text, Text)])] stalenessMap <- traverse (lastTouched bareRepo) tree let blackholes = [ Text.pack path -- cgit v1.2.3