diff options
| author | Ben Sima <ben@bensima.com> | 2025-12-17 09:23:23 -0500 |
|---|---|---|
| committer | Ben Sima <ben@bensima.com> | 2025-12-17 09:23:23 -0500 |
| commit | 0044726a62179d25edd19e57b9bcd81c567ef6ee (patch) | |
| tree | 4422816ebd513141b97402dfed7337f73e47054c /Omni | |
| parent | 06f1e86433f3a4a15bccd51fd2aba0960410c0c1 (diff) | |
Fix Manifest.hs FromJSON parsers
Wrap parser chains in parentheses to fix compilation errors from
incorrect use of </ operator.
Diffstat (limited to 'Omni')
| -rw-r--r-- | Omni/Deploy/Manifest.hs | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/Omni/Deploy/Manifest.hs b/Omni/Deploy/Manifest.hs index 13dd47a..e0d0b78 100644 --- a/Omni/Deploy/Manifest.hs +++ b/Omni/Deploy/Manifest.hs @@ -71,9 +71,7 @@ instance Aeson.FromJSON Artifact where parseJSON = Aeson.withObject "Artifact" <| \o -> Artifact - </ o - .:? "type" - .!= "nix-closure" + </ (o .:? "type" .!= "nix-closure") <*> o .: "storePath" @@ -95,8 +93,7 @@ instance Aeson.FromJSON Exec where parseJSON = Aeson.withObject "Exec" <| \o -> Exec - </ o - .:? "command" + </ (o .:? "command") <*> o .:? "user" .!= "root" @@ -126,8 +123,7 @@ instance Aeson.FromJSON Http where parseJSON = Aeson.withObject "Http" <| \o -> Http - </ o - .: "domain" + </ (o .: "domain") <*> o .:? "path" .!= "/" @@ -154,9 +150,7 @@ instance Aeson.FromJSON Systemd where parseJSON = Aeson.withObject "Systemd" <| \o -> Systemd - </ o - .:? "after" - .!= ["network-online.target"] + </ (o .:? "after" .!= ["network-online.target"]) <*> o .:? "requires" .!= [] @@ -191,9 +185,7 @@ instance Aeson.FromJSON Hardening where parseJSON = Aeson.withObject "Hardening" <| \o -> Hardening - </ o - .:? "dynamicUser" - .!= False + </ (o .:? "dynamicUser" .!= False) <*> o .:? "privateTmp" .!= True @@ -234,8 +226,7 @@ instance Aeson.FromJSON Service where parseJSON = Aeson.withObject "Service" <| \o -> Service - </ o - .: "name" + </ (o .: "name") <*> o .: "artifact" <*> o @@ -286,9 +277,7 @@ instance Aeson.FromJSON Manifest where parseJSON = Aeson.withObject "Manifest" <| \o -> Manifest - </ o - .:? "version" - .!= 1 + </ (o .:? "version" .!= 1) <*> o .: "generation" <*> o |
