summaryrefslogtreecommitdiff
path: root/Biz/Devalloc.hs
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2021-06-10 08:14:16 -0400
committerBen Sima <ben@bsima.me>2021-11-26 13:47:35 -0500
commit72a7aaa39e7552970f466e712e1f7ef91aeb03c8 (patch)
tree8b8d501d28a9c1d56a0150d8129ff6324f196ad9 /Biz/Devalloc.hs
parent0ff0a23c8c7425b0d56b95e318c2087e74cb6605 (diff)
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.
Diffstat (limited to 'Biz/Devalloc.hs')
-rw-r--r--Biz/Devalloc.hs18
1 files changed, 5 insertions, 13 deletions
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