From 260b7b83b0ec396bb880038f4c93f977af0056c5 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Tue, 16 Dec 2025 14:14:41 -0500 Subject: Fix hlint errors in Deploy modules - Systemd: use list comprehension instead of if-then-else - Manifest: use operator, replace case with maybe - Deployer: use newtype, use flip removeService - Caddy: use newtype for single-field types --- Omni/Deploy/Deployer.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Omni/Deploy/Deployer.hs') diff --git a/Omni/Deploy/Deployer.hs b/Omni/Deploy/Deployer.hs index fe03f74..ee06907 100644 --- a/Omni/Deploy/Deployer.hs +++ b/Omni/Deploy/Deployer.hs @@ -71,7 +71,7 @@ gcrootsDir = "/nix/var/nix/gcroots/biz" s3Url :: String s3Url = "s3://omni-nix-cache?profile=digitalocean&scheme=https&endpoint=nyc3.digitaloceanspaces.com" -data DeployerState = DeployerState +newtype DeployerState = DeployerState { stateServices :: Map Text Text } deriving (Show, Eq, Generic, Aeson.FromJSON, Aeson.ToJSON) @@ -196,7 +196,7 @@ reconcile manifest st = do localServices = Set.fromList <| Map.keys (stateServices st) toRemove = localServices Set.\\ mfstServices - st' <- foldM (\s name -> removeService name s) st (Set.toList toRemove) + st' <- foldM (flip removeService) st (Set.toList toRemove) foldM ( \s svc -> -- cgit v1.2.3