refactor: hlint
This commit is contained in:
parent
cb0d528924
commit
c7c4f50f5b
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 --
|
||||
|
||||
Loading…
Reference in New Issue
Block a user