refactor: hlint

This commit is contained in:
Gregor Kleen 2021-01-27 22:22:12 +01:00
parent cb0d528924
commit c7c4f50f5b
3 changed files with 3 additions and 5 deletions

View File

@ -568,7 +568,7 @@ appMain = runResourceT $ do
void . runMaybeT $ do
results <- hoistMaybe mResults
let latestResults = Map.fromListWith (flip const) $ Set.toAscList results
let latestResults = Map.fromListWith (\_ x -> x) $ Set.toAscList results
Min status <- hoistMaybe $ ofoldMap1 (Min . healthReportStatus) <$> fromNullable latestResults
$logInfoS "NotifyStatus" $ toPathPiece status
liftIO . void . Systemd.notifyStatus . unpack $ toPathPiece status

View File

@ -388,9 +388,7 @@ workflowWorkflowList (title, heading) WWListColumns{..} sqlPred = do
viewActors <- hoistMaybe $ preview _wgeViewActor =<< mVia
guardM $ anyM (otoList viewActors) hasWorkflowRole'
resUser <- lift . lift $ traverse getEntity wpUser'
return $ case resUser of
Just mEnt -> toJsonUser mEnt
Nothing -> JsonWorkflowUserAnonymous
return $ maybe JsonWorkflowUserAnonymous toJsonUser resUser
payload <- do
payload' <- fmap Map.fromList . forMaybeM (Map.toList currentPayload) $ \x@(payloadLbl, _) -> x <$ do

View File

@ -465,7 +465,7 @@ assertMonoid f x = guardMonoid (f x) x
maybeMonoid :: Monoid m => Maybe m -> m
-- ^ Identify `Nothing` with `mempty`
maybeMonoid = maybe mempty id
maybeMonoid = fromMaybe mempty
------------
-- Tuples --