refactor: hlint
This commit is contained in:
parent
cb0d528924
commit
c7c4f50f5b
@ -568,7 +568,7 @@ appMain = runResourceT $ do
|
|||||||
void . runMaybeT $ do
|
void . runMaybeT $ do
|
||||||
results <- hoistMaybe mResults
|
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
|
Min status <- hoistMaybe $ ofoldMap1 (Min . healthReportStatus) <$> fromNullable latestResults
|
||||||
$logInfoS "NotifyStatus" $ toPathPiece status
|
$logInfoS "NotifyStatus" $ toPathPiece status
|
||||||
liftIO . void . Systemd.notifyStatus . unpack $ toPathPiece status
|
liftIO . void . Systemd.notifyStatus . unpack $ toPathPiece status
|
||||||
|
|||||||
@ -388,9 +388,7 @@ workflowWorkflowList (title, heading) WWListColumns{..} sqlPred = do
|
|||||||
viewActors <- hoistMaybe $ preview _wgeViewActor =<< mVia
|
viewActors <- hoistMaybe $ preview _wgeViewActor =<< mVia
|
||||||
guardM $ anyM (otoList viewActors) hasWorkflowRole'
|
guardM $ anyM (otoList viewActors) hasWorkflowRole'
|
||||||
resUser <- lift . lift $ traverse getEntity wpUser'
|
resUser <- lift . lift $ traverse getEntity wpUser'
|
||||||
return $ case resUser of
|
return $ maybe JsonWorkflowUserAnonymous toJsonUser resUser
|
||||||
Just mEnt -> toJsonUser mEnt
|
|
||||||
Nothing -> JsonWorkflowUserAnonymous
|
|
||||||
|
|
||||||
payload <- do
|
payload <- do
|
||||||
payload' <- fmap Map.fromList . forMaybeM (Map.toList currentPayload) $ \x@(payloadLbl, _) -> x <$ 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
|
maybeMonoid :: Monoid m => Maybe m -> m
|
||||||
-- ^ Identify `Nothing` with `mempty`
|
-- ^ Identify `Nothing` with `mempty`
|
||||||
maybeMonoid = maybe mempty id
|
maybeMonoid = fromMaybe mempty
|
||||||
|
|
||||||
------------
|
------------
|
||||||
-- Tuples --
|
-- Tuples --
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user