From 647f93712a1a7e74dc053f560976d62a9d4f8a95 Mon Sep 17 00:00:00 2001 From: Gautier DI FOLCO Date: Wed, 31 Dec 2025 17:33:16 +0100 Subject: [PATCH 1/4] WPB-22515: upgrade ormolu --- integration/test/API/BrigInternal.hs | 2 +- integration/test/API/Galley.hs | 3 +- integration/test/MLS/Util.hs | 2 +- integration/test/Test/Conversation.hs | 6 ++-- integration/test/Test/DomainVerification.hs | 6 ++-- integration/test/Test/UserGroup.hs | 18 +++++------ integration/test/Testlib/ModService.hs | 8 ++--- .../polysemy-wire-zoo/src/Polysemy/TinyLog.hs | 3 +- .../src/Wire/Sem/Now/Spec.hs | 3 +- libs/saml2-web-sso/src/SAML2/WebSSO/Cookie.hs | 2 +- libs/saml2-web-sso/src/SAML2/WebSSO/Types.hs | 8 ++--- libs/saml2-web-sso/src/SAML2/WebSSO/XML.hs | 2 +- .../src/Wire/API/Federation/Endpoint.hs | 6 ++-- libs/wire-api/src/Wire/API/Conversation.hs | 3 +- .../Wire/API/Routes/Internal/Enterprise.hs | 3 +- .../src/Wire/API/Routes/Internal/Galley.hs | 3 +- .../src/Wire/API/Routes/Public/Brig.hs | 9 ++---- .../Routes/Public/Brig/DomainVerification.hs | 6 ++-- .../src/Wire/API/Routes/Public/Spar.hs | 3 +- libs/wire-api/src/Wire/API/Routes/Version.hs | 3 +- libs/wire-api/src/Wire/API/Team/Member.hs | 12 ++++---- libs/wire-api/src/Wire/API/User/Activation.hs | 3 +- libs/wire-api/src/Wire/API/UserEvent.hs | 6 ++-- .../Wire/API/Golden/Generated/NewUser_user.hs | 3 +- .../API/Golden/Generated/RTCIceServer_user.hs | 3 +- .../API/Golden/Generated/SimpleMember_user.hs | 6 ++-- .../Wire/API/Golden/Manual/LoginId_user.hs | 3 +- .../Wire/API/Golden/Manual/SubConversation.hs | 6 ++-- .../Test/Wire/API/Golden/Manual/UserEvent.hs | 6 ++-- .../Wire/BackgroundJobsPublisher/RabbitMQ.hs | 3 +- .../src/Wire/ConversationStore/Cassandra.hs | 3 +- .../src/Wire/ConversationStore/Postgres.hs | 4 +-- .../Cassandra.hs | 3 +- .../EnterpriseLoginSubsystem/Interpreter.hs | 3 +- .../Wire/FederationConfigStore/Cassandra.hs | 3 +- .../Wire/IndexedUserStore/ElasticSearch.hs | 3 +- .../src/Wire/ScimSubsystem/Interpreter.hs | 2 +- .../TeamCollaboratorsSubsystem/Interpreter.hs | 9 ++---- .../src/Wire/TeamSubsystem/Util.hs | 2 +- .../src/Wire/UserGroupStore/Postgres.hs | 3 +- .../Wire/UserGroupSubsystem/Interpreter.hs | 3 +- .../MockInterpreters/ActivationCodeStore.hs | 3 +- .../Wire/UserSubsystem/InterpreterSpec.hs | 2 +- nix/wire-server.nix | 4 +-- services/brig/src/Brig/API/Internal.hs | 30 +++++++------------ services/brig/src/Brig/API/Public.hs | 14 ++++----- services/brig/src/Brig/API/User.hs | 6 ++-- services/brig/src/Brig/Provider/API.hs | 6 ++-- .../brig/test/integration/API/User/Auth.hs | 3 +- .../test/integration/Federation/End2end.hs | 6 ++-- .../galley/src/Galley/API/Action/Notify.hs | 3 +- services/galley/src/Galley/API/Federation.hs | 3 +- services/galley/src/Galley/API/Internal.hs | 3 +- .../galley/src/Galley/API/MLS/CheckClients.hs | 4 +-- .../galley/src/Galley/API/MLS/GroupInfo.hs | 3 +- services/galley/src/Galley/API/MLS/Message.hs | 3 +- services/galley/src/Galley/App.hs | 3 +- services/galley/test/integration/API.hs | 3 +- .../galley/test/integration/API/MLS/Mocks.hs | 3 +- .../galley/test/integration/API/MLS/Util.hs | 3 +- services/galley/test/integration/API/Teams.hs | 3 +- services/gundeck/test/unit/MockGundeck.hs | 4 +-- services/spar/src/Spar/API.hs | 2 +- .../test-integration/Test/Spar/APISpec.hs | 16 ++++------ tools/stern/src/Stern/API.hs | 2 +- 65 files changed, 122 insertions(+), 198 deletions(-) diff --git a/integration/test/API/BrigInternal.hs b/integration/test/API/BrigInternal.hs index d23d793f2e..03775fc514 100644 --- a/integration/test/API/BrigInternal.hs +++ b/integration/test/API/BrigInternal.hs @@ -66,7 +66,7 @@ createUser domain cu = do [ "name" .= "integration test team", "icon" .= "default" ] - | cu.team + | cu.team ] ) diff --git a/integration/test/API/Galley.hs b/integration/test/API/Galley.hs index 96fb09923b..391b162b77 100644 --- a/integration/test/API/Galley.hs +++ b/integration/test/API/Galley.hs @@ -595,8 +595,7 @@ updateRole caller target role qcnv = do caller Galley Versioned - ( joinHttpPath ["conversations", cnvDomain, cnvId, "members", tarDomain, tarId] - ) + (joinHttpPath ["conversations", cnvDomain, cnvId, "members", tarDomain, tarId]) submit "PUT" (req & addJSONObject ["conversation_role" .= roleReq]) updateReceiptMode :: diff --git a/integration/test/MLS/Util.hs b/integration/test/MLS/Util.hs index 827b317b15..54971aa8e1 100644 --- a/integration/test/MLS/Util.hs +++ b/integration/test/MLS/Util.hs @@ -181,7 +181,7 @@ initMLSClient opts cid = do let keys = object [ csSignatureScheme ciphersuite .= T.decodeUtf8 (Base64.encode pkey) - | (ciphersuite, pkey) <- suitePKeys + | (ciphersuite, pkey) <- suitePKeys ] bindResponse ( updateClient diff --git a/integration/test/Test/Conversation.hs b/integration/test/Test/Conversation.hs index 131260d5b7..dfd5a9d96c 100644 --- a/integration/test/Test/Conversation.hs +++ b/integration/test/Test/Conversation.hs @@ -104,9 +104,9 @@ testDynamicBackendsFullyConnectedWhenAllowDynamic = do -- between backends when the federation strategy is 'allowDynamic'. sequence_ [ BrigI.createFedConn x (BrigI.FedConn y "full_search" Nothing) - | x <- [domainA, domainB, domainC], - y <- [domainA, domainB, domainC], - x /= y + | x <- [domainA, domainB, domainC], + y <- [domainA, domainB, domainC], + x /= y ] uidA <- randomUser domainA def {BrigI.team = True} uidB <- randomUser domainB def {BrigI.team = True} diff --git a/integration/test/Test/DomainVerification.hs b/integration/test/Test/DomainVerification.hs index bec68fb854..f80df2547a 100644 --- a/integration/test/Test/DomainVerification.hs +++ b/integration/test/Test/DomainVerification.hs @@ -273,8 +273,7 @@ testUpdateTeamInvite = forM_ [ExplicitVersion 8, Versioned] \version -> do -- admin should not be able to set team-invite if the team hasn't been authorized bindResponse - ( updateTeamInvite owner domain (object ["team_invite" .= "team", "team" .= tid]) - ) + (updateTeamInvite owner domain (object ["team_invite" .= "team", "team" .= tid])) $ \resp -> do resp.status `shouldMatchInt` 403 resp.json %. "label" `shouldMatch` "operation-forbidden-for-domain-registration-state" @@ -283,8 +282,7 @@ testUpdateTeamInvite = forM_ [ExplicitVersion 8, Versioned] \version -> do -- non-admin should not be able to set team-invite bindResponse - ( updateTeamInvite mem domain (object ["team_invite" .= "team", "team" .= tid]) - ) + (updateTeamInvite mem domain (object ["team_invite" .= "team", "team" .= tid])) $ \resp -> do resp.status `shouldMatchInt` 403 resp.json %. "label" `shouldMatch` "operation-forbidden-for-domain-registration-state" diff --git a/integration/test/Test/UserGroup.hs b/integration/test/Test/UserGroup.hs index ac0101c68b..c03c1389e2 100644 --- a/integration/test/Test/UserGroup.hs +++ b/integration/test/Test/UserGroup.hs @@ -359,15 +359,15 @@ testUserGroupGetGroupsAllInputs = do includeMemberCount = includeMemberCount', includeChannels = includeChannels' } - | q' <- qs, - sortBy' <- sortByKeysList, - sortOrder' <- sortOrders, - pSize' <- pSizes, - lastName' <- lastNames, - lastCreatedAt' <- lastCreatedAts, - lastId' <- lastIds, - includeMemberCount' <- [False, True], - includeChannels' <- [False, True] + | q' <- qs, + sortBy' <- sortByKeysList, + sortOrder' <- sortOrders, + pSize' <- pSizes, + lastName' <- lastNames, + lastCreatedAt' <- lastCreatedAts, + lastId' <- lastIds, + includeMemberCount' <- [False, True], + includeChannels' <- [False, True] ] where qs = [Nothing, Just "A"] diff --git a/integration/test/Testlib/ModService.hs b/integration/test/Testlib/ModService.hs index e111bcb76b..3939c17164 100644 --- a/integration/test/Testlib/ModService.hs +++ b/integration/test/Testlib/ModService.hs @@ -304,10 +304,10 @@ updateServiceMapInConfig resource forSrv config = ) config [ (srv, berInternalServicePorts resource srv :: Int) - | srv <- allServices, - -- if a service is not enabled, do not set its endpoint configuration, - -- unless we are starting the service itself - berEnableService resource srv || srv == forSrv + | srv <- allServices, + -- if a service is not enabled, do not set its endpoint configuration, + -- unless we are starting the service itself + berEnableService resource srv || srv == forSrv ] startBackend :: diff --git a/libs/polysemy-wire-zoo/src/Polysemy/TinyLog.hs b/libs/polysemy-wire-zoo/src/Polysemy/TinyLog.hs index 4a72cb8f8c..b40f904e7f 100644 --- a/libs/polysemy-wire-zoo/src/Polysemy/TinyLog.hs +++ b/libs/polysemy-wire-zoo/src/Polysemy/TinyLog.hs @@ -53,8 +53,7 @@ logErrors showError msg action = Polysemy.Error.catch action $ \e -> do logAndIgnoreErrors :: forall e r. - ( Member TinyLog r - ) => + (Member TinyLog r) => (e -> Text) -> Text -> Sem (Error e ': r) () -> diff --git a/libs/polysemy-wire-zoo/src/Wire/Sem/Now/Spec.hs b/libs/polysemy-wire-zoo/src/Wire/Sem/Now/Spec.hs index 84b789646b..9e7b65ee13 100644 --- a/libs/polysemy-wire-zoo/src/Wire/Sem/Now/Spec.hs +++ b/libs/polysemy-wire-zoo/src/Wire/Sem/Now/Spec.hs @@ -65,5 +65,4 @@ prop_nowNow = pure $ simpleLaw (liftA2 (<=) E.get E.get) - ( pure True - ) + (pure True) diff --git a/libs/saml2-web-sso/src/SAML2/WebSSO/Cookie.hs b/libs/saml2-web-sso/src/SAML2/WebSSO/Cookie.hs index 2afd63ddf2..d11cdc59b1 100644 --- a/libs/saml2-web-sso/src/SAML2/WebSSO/Cookie.hs +++ b/libs/saml2-web-sso/src/SAML2/WebSSO/Cookie.hs @@ -52,7 +52,7 @@ headerValueToCookie txt = do let cookie = parseSetCookie $ cs txt case ["missing cookie name" | setCookieName cookie == ""] <> [ cs $ "wrong cookie name: got " <> setCookieName cookie <> ", expected " <> cookieName (Proxy @name) - | setCookieName cookie /= cookieName (Proxy @name) + | setCookieName cookie /= cookieName (Proxy @name) ] <> ["missing cookie value" | setCookieValue cookie == ""] of errs@(_ : _) -> throwError $ ST.intercalate ", " errs diff --git a/libs/saml2-web-sso/src/SAML2/WebSSO/Types.hs b/libs/saml2-web-sso/src/SAML2/WebSSO/Types.hs index e5fd8b5316..21c5732287 100644 --- a/libs/saml2-web-sso/src/SAML2/WebSSO/Types.hs +++ b/libs/saml2-web-sso/src/SAML2/WebSSO/Types.hs @@ -441,19 +441,19 @@ mkNameID nid@(UNameIDEntity uri) m1 m2 m3 = do mapM_ throwError $ [ "mkNameID: nameIDNameQ, nameIDSPNameQ, nameIDSPProvidedID MUST be omitted for entity NameIDs." <> show [m1, m2, m3] - | all isJust [m1, m2, m3] + | all isJust [m1, m2, m3] ] <> [ "mkNameID: entity URI too long: " <> show uritxt - | uritxt <- [renderURI uri], - ST.length uritxt > 1024 + | uritxt <- [renderURI uri], + ST.length uritxt > 1024 ] pure $ NameID nid Nothing Nothing Nothing mkNameID nid@(UNameIDPersistent txt) m1 m2 m3 = do mapM_ throwError $ [ "mkNameID: persistent text too long: " <> show (nid, ST.length txt) - | ST.length txt > 1024 + | ST.length txt > 1024 ] pure $ NameID nid m1 m2 m3 mkNameID nid m1 m2 m3 = do diff --git a/libs/saml2-web-sso/src/SAML2/WebSSO/XML.hs b/libs/saml2-web-sso/src/SAML2/WebSSO/XML.hs index e3b77b281f..3a17412898 100644 --- a/libs/saml2-web-sso/src/SAML2/WebSSO/XML.hs +++ b/libs/saml2-web-sso/src/SAML2/WebSSO/XML.hs @@ -517,7 +517,7 @@ exportConditions conds = HX.conditions = [HX.OneTimeUse | conds ^. condOneTimeUse] <> [ HX.AudienceRestriction (HX.Audience . exportURI <$> hsrs) - | hsrs <- conds ^. condAudienceRestriction + | hsrs <- conds ^. condAudienceRestriction ] } diff --git a/libs/wire-api-federation/src/Wire/API/Federation/Endpoint.hs b/libs/wire-api-federation/src/Wire/API/Federation/Endpoint.hs index f93c1ed6ae..befd35a88a 100644 --- a/libs/wire-api-federation/src/Wire/API/Federation/Endpoint.hs +++ b/libs/wire-api-federation/src/Wire/API/Federation/Endpoint.hs @@ -63,8 +63,7 @@ type UnnamedFedEndpointWithMods (mods :: [Type]) path input output = type FedEndpointWithMods (mods :: [Type]) name input output = Named name - ( UnnamedFedEndpointWithMods mods (FedPath name) input output - ) + (UnnamedFedEndpointWithMods mods (FedPath name) input output) type FedEndpoint name input output = FedEndpointWithMods '[] name input output @@ -156,8 +155,7 @@ data StreamPostWithRemoteIp framing (ct :: Type) a -- Server-side simply delegates to the standard 'StreamPost' implementation. instance - ( HasServer (StreamPost framing ct a) context - ) => + (HasServer (StreamPost framing ct a) context) => HasServer (StreamPostWithRemoteIp framing ct a) context where type ServerT (StreamPostWithRemoteIp framing ct a) m = ServerT (StreamPost framing ct a) m diff --git a/libs/wire-api/src/Wire/API/Conversation.hs b/libs/wire-api/src/Wire/API/Conversation.hs index 839d31fe01..d10ad9c6f0 100644 --- a/libs/wire-api/src/Wire/API/Conversation.hs +++ b/libs/wire-api/src/Wire/API/Conversation.hs @@ -954,8 +954,7 @@ newConvSchema v sch = <*> newConvCells .= (fromMaybe False <$> optField "cells" schema) <*> newConvChannelAddPermission .= maybe_ - ( optFieldWithDocModifier "add_permission" (description ?~ "Channel add permission") schema - ) + (optFieldWithDocModifier "add_permission" (description ?~ "Channel add permission") schema) <*> newConvSkipCreator .= ( fromMaybe False <$> optFieldWithDocModifier diff --git a/libs/wire-api/src/Wire/API/Routes/Internal/Enterprise.hs b/libs/wire-api/src/Wire/API/Routes/Internal/Enterprise.hs index ca5e570297..b8e3e0509a 100644 --- a/libs/wire-api/src/Wire/API/Routes/Internal/Enterprise.hs +++ b/libs/wire-api/src/Wire/API/Routes/Internal/Enterprise.hs @@ -29,8 +29,7 @@ type InternalAPI = "i" :> InternalAPIBase type InternalAPIBase = Named "status" - ( "status" :> MultiVerb 'GET '[JSON] '[RespondEmpty 200 "OK"] () - ) + ("status" :> MultiVerb 'GET '[JSON] '[RespondEmpty 200 "OK"] ()) :<|> Named "create-verification-token" ( "create-verification-token" diff --git a/libs/wire-api/src/Wire/API/Routes/Internal/Galley.hs b/libs/wire-api/src/Wire/API/Routes/Internal/Galley.hs index 1293fcd7aa..ea44ce0803 100644 --- a/libs/wire-api/src/Wire/API/Routes/Internal/Galley.hs +++ b/libs/wire-api/src/Wire/API/Routes/Internal/Galley.hs @@ -119,8 +119,7 @@ type InternalAPI = "i" :> InternalAPIBase type InternalAPIBase = Named "status" - ( "status" :> MultiVerb 'GET '[JSON] '[RespondEmpty 200 "OK"] () - ) + ("status" :> MultiVerb 'GET '[JSON] '[RespondEmpty 200 "OK"] ()) -- This endpoint can lead to the following events being sent: -- - MemberLeave event to members for all conversations the user was in :<|> Named diff --git a/libs/wire-api/src/Wire/API/Routes/Public/Brig.hs b/libs/wire-api/src/Wire/API/Routes/Public/Brig.hs index e947cfa207..313a12fe37 100644 --- a/libs/wire-api/src/Wire/API/Routes/Public/Brig.hs +++ b/libs/wire-api/src/Wire/API/Routes/Public/Brig.hs @@ -1040,8 +1040,7 @@ type UserClientAPI = :> MultiVerb1 'GET '[JSON] - ( VersionedRespond 'V6 200 "List of clients" [Client] - ) + (VersionedRespond 'V6 200 "List of clients" [Client]) ) :<|> Named "list-clients@v7" @@ -1053,8 +1052,7 @@ type UserClientAPI = :> MultiVerb1 'GET '[JSON] - ( VersionedRespond 'V7 200 "List of clients" [Client] - ) + (VersionedRespond 'V7 200 "List of clients" [Client]) ) :<|> Named "list-clients" @@ -1065,8 +1063,7 @@ type UserClientAPI = :> MultiVerb1 'GET '[JSON] - ( Respond 200 "List of clients" [Client] - ) + (Respond 200 "List of clients" [Client]) ) :<|> Named "get-client@v6" diff --git a/libs/wire-api/src/Wire/API/Routes/Public/Brig/DomainVerification.hs b/libs/wire-api/src/Wire/API/Routes/Public/Brig/DomainVerification.hs index c054e55306..e7447c46a0 100644 --- a/libs/wire-api/src/Wire/API/Routes/Public/Brig/DomainVerification.hs +++ b/libs/wire-api/src/Wire/API/Routes/Public/Brig/DomainVerification.hs @@ -299,8 +299,7 @@ instance ToSchema DomainRedirectResponseV9 where DomainRedirectResponse <$> (\r -> True <$ guard r.propagateUserExists) .= maybe_ - ( fromMaybe False <$> optField "due_to_existing_account" schema - ) + (fromMaybe False <$> optField "due_to_existing_account" schema) <*> (.redirect) .= domainRedirectSchemaV9 type DomainRedirectResponseV10 = DomainRedirectResponse V10 @@ -319,8 +318,7 @@ instance ToSchema DomainRedirectResponseV10 where DomainRedirectResponse <$> (\r -> True <$ guard r.propagateUserExists) .= maybe_ - ( fromMaybe False <$> optField "due_to_existing_account" schema - ) + (fromMaybe False <$> optField "due_to_existing_account" schema) <*> (.redirect) .= domainRedirectSchema V10 type DomainVerificationChallengeAPI = diff --git a/libs/wire-api/src/Wire/API/Routes/Public/Spar.hs b/libs/wire-api/src/Wire/API/Routes/Public/Spar.hs index 6a40c1330b..642b9dc522 100644 --- a/libs/wire-api/src/Wire/API/Routes/Public/Spar.hs +++ b/libs/wire-api/src/Wire/API/Routes/Public/Spar.hs @@ -170,8 +170,7 @@ type IdpDelete = type SsoSettingsGet = Named "sso-settings" - ( Get '[JSON] SsoSettings - ) + (Get '[JSON] SsoSettings) sparSPIssuer :: (Functor m, SAML.HasConfig m) => Maybe TeamId -> Maybe Domain -> m (Maybe SAML.Issuer) sparSPIssuer mbtid = (SAML.Issuer <$$>) . sparResponseURI mbtid diff --git a/libs/wire-api/src/Wire/API/Routes/Version.hs b/libs/wire-api/src/Wire/API/Routes/Version.hs index 5c42225508..b251e039bf 100644 --- a/libs/wire-api/src/Wire/API/Routes/Version.hs +++ b/libs/wire-api/src/Wire/API/Routes/Version.hs @@ -299,8 +299,7 @@ instance ToSchema VersionExp where <> tag _VersionExpDevelopment ( unnamed - ( enum @Text "VersionExpDevelopment" (element "development" ()) - ) + (enum @Text "VersionExpDevelopment" (element "development" ())) ) deriving via Schema VersionExp instance (FromJSON VersionExp) diff --git a/libs/wire-api/src/Wire/API/Team/Member.hs b/libs/wire-api/src/Wire/API/Team/Member.hs index d11f69e14d..2d75ce2e04 100644 --- a/libs/wire-api/src/Wire/API/Team/Member.hs +++ b/libs/wire-api/src/Wire/API/Team/Member.hs @@ -521,12 +521,12 @@ permissionsRole (Permissions p p') = permsRole perms = listToMaybe [ role - | role <- [minBound ..], - -- if a there is a role that is strictly less permissive than the perms set that - -- we encounter, we downgrade. this shouldn't happen in real life, but it has - -- happened to very old users on a staging environment, where a user (probably) - -- was create before the current publicly visible permissions had been stabilized. - rolePerms role `Set.isSubsetOf` perms + | role <- [minBound ..], + -- if a there is a role that is strictly less permissive than the perms set that + -- we encounter, we downgrade. this shouldn't happen in real life, but it has + -- happened to very old users on a staging environment, where a user (probably) + -- was create before the current publicly visible permissions had been stabilized. + rolePerms role `Set.isSubsetOf` perms ] -- | Internal function for 'rolePermissions'. (It works iff the two sets in 'Permissions' are diff --git a/libs/wire-api/src/Wire/API/User/Activation.hs b/libs/wire-api/src/Wire/API/User/Activation.hs index 84c993870b..e6ee35fd35 100644 --- a/libs/wire-api/src/Wire/API/User/Activation.hs +++ b/libs/wire-api/src/Wire/API/User/Activation.hs @@ -205,8 +205,7 @@ instance ToSchema SendActivationCode where .= maybe_ ( optFieldWithDocModifier "locale" - ( description ?~ "Locale to use for the activation code template." - ) + (description ?~ "Locale to use for the activation code template.") schema ) where diff --git a/libs/wire-api/src/Wire/API/UserEvent.hs b/libs/wire-api/src/Wire/API/UserEvent.hs index a2bf6e4a39..89e6a600af 100644 --- a/libs/wire-api/src/Wire/API/UserEvent.hs +++ b/libs/wire-api/src/Wire/API/UserEvent.hs @@ -319,13 +319,11 @@ eventObjectSchema = EventTypeUserLegalholdEnabled -> tag _UserEvent - ( tag _UserLegalHoldEnabled (field "id" schema) - ) + (tag _UserLegalHoldEnabled (field "id" schema)) EventTypeUserLegalholdDisabled -> tag _UserEvent - ( tag _UserLegalHoldDisabled (field "id" schema) - ) + (tag _UserLegalHoldDisabled (field "id" schema)) EventTypeUserLegalholdRequested -> tag _UserEvent diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewUser_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewUser_user.hs index 77084a3e64..a910f962d9 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewUser_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/NewUser_user.hs @@ -160,8 +160,7 @@ testObject_NewUser_user_8 = newUserIdentity = Just ( EmailIdentity - ( unsafeEmailAddress "some" "example" - ) + (unsafeEmailAddress "some" "example") ), newUserPassword = Just (plainTextPassword8Unsafe "12345678") } diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RTCIceServer_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RTCIceServer_user.hs index 27d2122fe7..d6a7f3dabc 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RTCIceServer_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/RTCIceServer_user.hs @@ -62,8 +62,7 @@ testObject_RTCIceServer_user_1 = testObject_RTCIceServer_user_2 :: RTCIceServer testObject_RTCIceServer_user_2 = rtcIceServer - ( NonEmpty.singleton (turnURI SchemeTurn (TurnHostIp (IpAddr (read "108.37.81.160"))) (read "0") (Just TransportTCP)) - ) + (NonEmpty.singleton (turnURI SchemeTurn (TurnHostIp (IpAddr (read "108.37.81.160"))) (read "0") (Just TransportTCP))) ( turnUsername (secondsToNominalDiffTime 3.000000000000) "a8kdffu4" & tuVersion .~ 5 & tuKeyindex .~ 24 diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/SimpleMember_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/SimpleMember_user.hs index ab173f4d92..4a5b21046b 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/SimpleMember_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/SimpleMember_user.hs @@ -31,8 +31,7 @@ testObject_SimpleMember_user_1 = { smQualifiedId = Qualified (Id (fromJust (UUID.fromString "0000003a-0000-0042-0000-007500000037"))) (Domain "faraway.example.com"), smConvRoleName = fromJust - ( parseRoleName "wire_member" - ) + (parseRoleName "wire_member") } testObject_SimpleMember_user_2 :: SimpleMember @@ -41,6 +40,5 @@ testObject_SimpleMember_user_2 = { smQualifiedId = Qualified (Id (fromJust (UUID.fromString "0000003a-0000-0042-0000-007500000037"))) (Domain "faraway.example.com"), smConvRoleName = fromJust - ( parseRoleName "wire_admin" - ) + (parseRoleName "wire_admin") } diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/LoginId_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/LoginId_user.hs index c739d7d034..ead2775ee4 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/LoginId_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/LoginId_user.hs @@ -30,8 +30,7 @@ testObject_LoginId_user_1 = testObject_LoginId_user_2 :: LoginId testObject_LoginId_user_2 = LoginByEmail - ( unsafeEmailAddress "some" "example" - ) + (unsafeEmailAddress "some" "example") testObject_LoginId_user_3 :: LoginId testObject_LoginId_user_3 = LoginByHandle (fromJust (parseHandle "7a8gg3v98")) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/SubConversation.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/SubConversation.hs index eda0dcb51a..8ae7df9b02 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/SubConversation.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/SubConversation.hs @@ -46,8 +46,7 @@ domain = Domain "golden.example.com" convId :: Qualified ConvId convId = Qualified - ( Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000100000001")) - ) + (Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000100000001"))) domain testObject_PublicSubConversation_1 :: PublicSubConversation @@ -82,7 +81,6 @@ testObject_PublicSubConversation_2 = user :: Qualified UserId user = Qualified - ( Id (fromJust (UUID.fromString "00000000-0000-0007-0000-000a00000002")) - ) + (Id (fromJust (UUID.fromString "00000000-0000-0007-0000-000a00000002"))) domain cid = ClientId 0xdeadbeef diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/UserEvent.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/UserEvent.hs index e24036faaa..6a6ea45918 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/UserEvent.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Manual/UserEvent.hs @@ -160,14 +160,12 @@ testObject_UserEvent_12 = testObject_UserEvent_13 :: Event testObject_UserEvent_13 = PropertyEvent - ( PropertySet (PropertyKey "a") (toJSON (39 :: Int)) - ) + (PropertySet (PropertyKey "a") (toJSON (39 :: Int))) testObject_UserEvent_14 :: Event testObject_UserEvent_14 = PropertyEvent - ( PropertyDeleted (PropertyKey "a") - ) + (PropertyDeleted (PropertyKey "a")) testObject_UserEvent_15 :: Event testObject_UserEvent_15 = PropertyEvent PropertiesCleared diff --git a/libs/wire-subsystems/src/Wire/BackgroundJobsPublisher/RabbitMQ.hs b/libs/wire-subsystems/src/Wire/BackgroundJobsPublisher/RabbitMQ.hs index 78b3b9aa8b..fecd5ca6bd 100644 --- a/libs/wire-subsystems/src/Wire/BackgroundJobsPublisher/RabbitMQ.hs +++ b/libs/wire-subsystems/src/Wire/BackgroundJobsPublisher/RabbitMQ.hs @@ -38,8 +38,7 @@ interpretBackgroundJobsPublisherRabbitMQ requestId channelMVar = publishJob requestId channel jobId jobPayload publishJob :: - ( Member (Embed IO) r - ) => + (Member (Embed IO) r) => RequestId -> Q.Channel -> JobId -> diff --git a/libs/wire-subsystems/src/Wire/ConversationStore/Cassandra.hs b/libs/wire-subsystems/src/Wire/ConversationStore/Cassandra.hs index cab006f346..66f3943b90 100644 --- a/libs/wire-subsystems/src/Wire/ConversationStore/Cassandra.hs +++ b/libs/wire-subsystems/src/Wire/ConversationStore/Cassandra.hs @@ -260,8 +260,7 @@ localConversations :: Sem r [StoredConversation] localConversations client = collectAndLog - <=< ( runEmbedded (runClient client) . embed . UnliftIO.pooledMapConcurrentlyN 8 localConversation' - ) + <=< (runEmbedded (runClient client) . embed . UnliftIO.pooledMapConcurrentlyN 8 localConversation') where collectAndLog cs = case partitionEithers cs of (errs, convs) -> traverse_ (warn . Log.msg) errs $> convs diff --git a/libs/wire-subsystems/src/Wire/ConversationStore/Postgres.hs b/libs/wire-subsystems/src/Wire/ConversationStore/Postgres.hs index 7d8b26ce82..ff1c89490c 100644 --- a/libs/wire-subsystems/src/Wire/ConversationStore/Postgres.hs +++ b/libs/wire-subsystems/src/Wire/ConversationStore/Postgres.hs @@ -1276,8 +1276,8 @@ searchConversationsImpl req = (sortOrderOperator req.sortOrder) -- the pagination cursor must match the ORDER BY. Therefore the comparison is case-insensitive. (mkClause "lower(name)" (Text.toLower lastName) <> mkClause "id" lastId) - | lastName <- toList req.lastName, - lastId <- toList req.lastId + | lastName <- toList req.lastName, + lastId <- toList req.lastId ] <> toList (like "name" <$> req.searchString) <> discoverableClause diff --git a/libs/wire-subsystems/src/Wire/DomainVerificationChallengeStore/Cassandra.hs b/libs/wire-subsystems/src/Wire/DomainVerificationChallengeStore/Cassandra.hs index 03ba7a6101..44ed929a56 100644 --- a/libs/wire-subsystems/src/Wire/DomainVerificationChallengeStore/Cassandra.hs +++ b/libs/wire-subsystems/src/Wire/DomainVerificationChallengeStore/Cassandra.hs @@ -34,8 +34,7 @@ import Wire.DomainVerificationChallengeStore interpretDomainVerificationChallengeStoreToCassandra :: forall r. - ( Member (Embed IO) r - ) => + (Member (Embed IO) r) => ClientState -> Timeout -> InterpreterFor DomainVerificationChallengeStore r diff --git a/libs/wire-subsystems/src/Wire/EnterpriseLoginSubsystem/Interpreter.hs b/libs/wire-subsystems/src/Wire/EnterpriseLoginSubsystem/Interpreter.hs index 1f203564ed..54539dcd49 100644 --- a/libs/wire-subsystems/src/Wire/EnterpriseLoginSubsystem/Interpreter.hs +++ b/libs/wire-subsystems/src/Wire/EnterpriseLoginSubsystem/Interpreter.hs @@ -559,8 +559,7 @@ sendAuditMail url subject mBefore mAfter = do url <> " called;\nOld value:\n" <> fromLazyText - ( LT.decodeUtf8 (encodeDomainRegistrationPretty mBefore) - ) + (LT.decodeUtf8 (encodeDomainRegistrationPretty mBefore)) <> "\nNew value:\n" <> fromLazyText ( LT.decodeUtf8 diff --git a/libs/wire-subsystems/src/Wire/FederationConfigStore/Cassandra.hs b/libs/wire-subsystems/src/Wire/FederationConfigStore/Cassandra.hs index 2038fc697e..fcae3c1261 100644 --- a/libs/wire-subsystems/src/Wire/FederationConfigStore/Cassandra.hs +++ b/libs/wire-subsystems/src/Wire/FederationConfigStore/Cassandra.hs @@ -47,8 +47,7 @@ import Wire.FederationConfigStore -- In the future the config file will be removed and the database will be the only source of truth. interpretFederationDomainConfig :: forall r a. - ( Member (Embed IO) r - ) => + (Member (Embed IO) r) => ClientState -> Maybe FederationStrategy -> Map Domain FederationDomainConfig -> diff --git a/libs/wire-subsystems/src/Wire/IndexedUserStore/ElasticSearch.hs b/libs/wire-subsystems/src/Wire/IndexedUserStore/ElasticSearch.hs index 05241eadcd..320199e48d 100644 --- a/libs/wire-subsystems/src/Wire/IndexedUserStore/ElasticSearch.hs +++ b/libs/wire-subsystems/src/Wire/IndexedUserStore/ElasticSearch.hs @@ -76,8 +76,7 @@ interpretIndexedUserStoreES cfg = GetTeamSize tid -> getTeamSizeImpl cfg tid getTeamSizeImpl :: - ( Member (Embed IO) r - ) => + (Member (Embed IO) r) => IndexedUserStoreConfig -> TeamId -> Sem r TeamSize diff --git a/libs/wire-subsystems/src/Wire/ScimSubsystem/Interpreter.hs b/libs/wire-subsystems/src/Wire/ScimSubsystem/Interpreter.hs index 6ee8187034..e3edf0d19d 100644 --- a/libs/wire-subsystems/src/Wire/ScimSubsystem/Interpreter.hs +++ b/libs/wire-subsystems/src/Wire/ScimSubsystem/Interpreter.hs @@ -238,7 +238,7 @@ toStoredGroup scimBaseUri ug = Meta.WithMeta meta (Common.WithId ug.id_ sg) typ = "User", ref = Common.uriToText . mkLocation $ "/Users/" <> idToString uid } - | uid <- toList (runIdentity ug.members) + | uid <- toList (runIdentity ug.members) ] } diff --git a/libs/wire-subsystems/src/Wire/TeamCollaboratorsSubsystem/Interpreter.hs b/libs/wire-subsystems/src/Wire/TeamCollaboratorsSubsystem/Interpreter.hs index b28e38dfc5..7af4b25c9a 100644 --- a/libs/wire-subsystems/src/Wire/TeamCollaboratorsSubsystem/Interpreter.hs +++ b/libs/wire-subsystems/src/Wire/TeamCollaboratorsSubsystem/Interpreter.hs @@ -101,8 +101,7 @@ getAllTeamCollaboratorsImpl zUser team = do Store.getAllTeamCollaborators team internalGetTeamCollaboratorsWithIdsImpl :: - ( Member Store.TeamCollaboratorsStore r - ) => + (Member Store.TeamCollaboratorsStore r) => Set TeamId -> Set UserId -> Sem r [TeamCollaborator] @@ -110,8 +109,7 @@ internalGetTeamCollaboratorsWithIdsImpl = do Store.getTeamCollaboratorsWithIds internalUpdateTeamCollaboratorImpl :: - ( Member Store.TeamCollaboratorsStore r - ) => + (Member Store.TeamCollaboratorsStore r) => UserId -> TeamId -> Set CollaboratorPermission -> @@ -120,8 +118,7 @@ internalUpdateTeamCollaboratorImpl user team perms = do Store.updateTeamCollaborator user team perms internalRemoveTeamCollaboratorImpl :: - ( Member Store.TeamCollaboratorsStore r - ) => + (Member Store.TeamCollaboratorsStore r) => UserId -> TeamId -> Sem r () diff --git a/libs/wire-subsystems/src/Wire/TeamSubsystem/Util.hs b/libs/wire-subsystems/src/Wire/TeamSubsystem/Util.hs index da795e73da..f864cd02e2 100644 --- a/libs/wire-subsystems/src/Wire/TeamSubsystem/Util.hs +++ b/libs/wire-subsystems/src/Wire/TeamSubsystem/Util.hs @@ -53,7 +53,7 @@ generateTeamEvents uid tid eventsData = do { recipientUserId = u, recipientClients = RecipientClientsAll } - | u <- admins ^.. TM.teamMembers . traverse . TM.userId + | u <- admins ^.. TM.teamMembers . traverse . TM.userId ], transient = False } diff --git a/libs/wire-subsystems/src/Wire/UserGroupStore/Postgres.hs b/libs/wire-subsystems/src/Wire/UserGroupStore/Postgres.hs index 997f3fb6ff..ce4e3ae515 100644 --- a/libs/wire-subsystems/src/Wire/UserGroupStore/Postgres.hs +++ b/libs/wire-subsystems/src/Wire/UserGroupStore/Postgres.hs @@ -223,8 +223,7 @@ getUserGroup team id_ includeChannels = do getUserGroupsWithMembers :: forall r. - ( UserGroupStorePostgresEffectConstraints r - ) => + (UserGroupStorePostgresEffectConstraints r) => TeamId -> UserGroupPageRequest -> Sem r UserGroupPageWithMembers diff --git a/libs/wire-subsystems/src/Wire/UserGroupSubsystem/Interpreter.hs b/libs/wire-subsystems/src/Wire/UserGroupSubsystem/Interpreter.hs index 1ed9de0bc2..20b9ea71d9 100644 --- a/libs/wire-subsystems/src/Wire/UserGroupSubsystem/Interpreter.hs +++ b/libs/wire-subsystems/src/Wire/UserGroupSubsystem/Interpreter.hs @@ -261,8 +261,7 @@ getUserGroups getter pageReq = do getUserGroupsInternal :: forall r. - ( Member Store.UserGroupStore r - ) => + (Member Store.UserGroupStore r) => TeamId -> Maybe Text -> Maybe ManagedBy -> diff --git a/libs/wire-subsystems/test/unit/Wire/MockInterpreters/ActivationCodeStore.hs b/libs/wire-subsystems/test/unit/Wire/MockInterpreters/ActivationCodeStore.hs index 67773aa5cb..dfb21478e8 100644 --- a/libs/wire-subsystems/test/unit/Wire/MockInterpreters/ActivationCodeStore.hs +++ b/libs/wire-subsystems/test/unit/Wire/MockInterpreters/ActivationCodeStore.hs @@ -40,8 +40,7 @@ emailKeyToCode = . show inMemoryActivationCodeStoreInterpreter :: - ( Member (State (Map EmailKey (Maybe UserId, ActivationCode))) r - ) => + (Member (State (Map EmailKey (Maybe UserId, ActivationCode))) r) => InterpreterFor ActivationCodeStore r inMemoryActivationCodeStoreInterpreter = interpret \case LookupActivationCode ek -> gets (!? ek) diff --git a/libs/wire-subsystems/test/unit/Wire/UserSubsystem/InterpreterSpec.hs b/libs/wire-subsystems/test/unit/Wire/UserSubsystem/InterpreterSpec.hs index 4af0f52d43..edfb8af1f8 100644 --- a/libs/wire-subsystems/test/unit/Wire/UserSubsystem/InterpreterSpec.hs +++ b/libs/wire-subsystems/test/unit/Wire/UserSubsystem/InterpreterSpec.hs @@ -102,7 +102,7 @@ spec = describe "UserSubsystem.Interpreter" do Nothing (mkUserFromStored domain miniLocale targetUser) defUserLegalHoldStatus - | targetUser <- users + | targetUser <- users ] expectedLocalProfiles = mkExpectedProfiles localDomain localTargetUsers expectedProfiles1 = mkExpectedProfiles remoteDomain1 targetUsers1 diff --git a/nix/wire-server.nix b/nix/wire-server.nix index 999ec485d6..c5303cec00 100644 --- a/nix/wire-server.nix +++ b/nix/wire-server.nix @@ -422,9 +422,7 @@ let pkgs.kubelogin-oidc pkgs.nixpkgs-fmt pkgs.openssl - # FUTUREWORK: we are temporarily using the old ormolu version to prevent the noise of reformatting a lot of code - # upgrade ormolu and reformat in a follow up PR - pkgs.haskell.packages.ghc98.ormolu + pkgs.haskellPackages.ormolu pkgs.vacuum-go pkgs.shellcheck pkgs.treefmt diff --git a/services/brig/src/Brig/API/Internal.hs b/services/brig/src/Brig/API/Internal.hs index 69e76cc4e7..fc0d6a62e9 100644 --- a/services/brig/src/Brig/API/Internal.hs +++ b/services/brig/src/Brig/API/Internal.hs @@ -358,8 +358,7 @@ authAPI = ) federationRemotesAPI :: - ( Member FederationConfigStore r - ) => + (Member FederationConfigStore r) => ServerT BrigIRoutes.FederationRemotesAPI (Handler r) federationRemotesAPI = Named @"add-federation-remotes" addFederationRemote @@ -378,8 +377,7 @@ getFederationRemoteTeams domain = lift $ liftSem $ E.getFederationRemoteTeams domain addFederationRemoteTeam :: - ( Member FederationConfigStore r - ) => + (Member FederationConfigStore r) => Domain -> FederationRemoteTeam -> (Handler r) () @@ -398,8 +396,7 @@ getFederationRemotes :: (Member FederationConfigStore r) => (Handler r) Federati getFederationRemotes = lift $ liftSem $ E.getFederationConfigs addFederationRemote :: - ( Member FederationConfigStore r - ) => + (Member FederationConfigStore r) => FederationDomainConfig -> (Handler r) () addFederationRemote fedDomConf = do @@ -775,15 +772,13 @@ getActivationCode email = do maybe (throwStd activationKeyNotFound) (pure . GetActivationCodeResp) apair getPasswordResetCodeH :: - ( Member AuthenticationSubsystem r - ) => + (Member AuthenticationSubsystem r) => EmailAddress -> Handler r GetPasswordResetCodeResp getPasswordResetCodeH email = getPasswordResetCode email getPasswordResetCode :: - ( Member AuthenticationSubsystem r - ) => + (Member AuthenticationSubsystem r) => EmailAddress -> Handler r GetPasswordResetCodeResp getPasswordResetCode email = @@ -1003,8 +998,7 @@ getAccountsByInternalH getByData = do lift . liftSem $ getAccountsBy (qualifyAs loc getByData) createGroupInternalH :: - ( Member UserGroupSubsystem r - ) => + (Member UserGroupSubsystem r) => CreateGroupInternalRequest -> Handler r UserGroup createGroupInternalH req = @@ -1016,8 +1010,7 @@ createGroupInternalH req = req.newGroup getGroupInternalH :: - ( Member UserGroupSubsystem r - ) => + (Member UserGroupSubsystem r) => TeamId -> UserGroupId -> Bool -> @@ -1026,8 +1019,7 @@ getGroupInternalH tid uid includeChannels = lift . liftSem $ getGroupInternal tid uid includeChannels getGroupsInternalH :: - ( Member UserGroupSubsystem r - ) => + (Member UserGroupSubsystem r) => TeamId -> Maybe T.Text -> Maybe ManagedBy -> @@ -1038,16 +1030,14 @@ getGroupsInternalH tid nameContains managedBy startIndex mbCount = lift . liftSem $ getGroupsInternal tid nameContains managedBy startIndex mbCount updateGroupInternalH :: - ( Member UserGroupSubsystem r - ) => + (Member UserGroupSubsystem r) => UpdateGroupInternalRequest -> Handler r () updateGroupInternalH req = lift . liftSem $ resetUserGroupInternal req deleteGroupManagedInternalH :: - ( Member UserGroupSubsystem r - ) => + (Member UserGroupSubsystem r) => TeamId -> UserGroupId -> ManagedBy -> diff --git a/services/brig/src/Brig/API/Public.hs b/services/brig/src/Brig/API/Public.hs index 99202db89c..4fcdefe883 100644 --- a/services/brig/src/Brig/API/Public.hs +++ b/services/brig/src/Brig/API/Public.hs @@ -309,7 +309,7 @@ versionedSwaggerDocsAPI Nothing = tocPage renderLink "swagger.json" ("/" <> v <> "/api/swagger.json"), "
" ] - | v <- versionToLByteString <$> [minBound :: Version ..] + | v <- versionToLByteString <$> [minBound :: Version ..] ] internal :: [LByteString] @@ -325,7 +325,7 @@ versionedSwaggerDocsAPI Nothing = tocPage renderLink "swagger.json" ("/api-internal/swagger-ui/" <> s <> "-swagger.json"), "
" ] - | s <- ["brig", "galley", "spar", "cargohold", "gundeck", "cannon", "proxy"] + | s <- ["brig", "galley", "spar", "cargohold", "gundeck", "cannon", "proxy"] ] federated :: [LByteString] @@ -338,10 +338,10 @@ versionedSwaggerDocsAPI Nothing = tocPage renderLink "swagger.json" ("/" <> v <> "/api-federation/swagger-ui/" <> s <> "-swagger.json"), "
" ] - | v <- versionToLByteString <$> [minBound :: Fed.Version ..] + | v <- versionToLByteString <$> [minBound :: Fed.Version ..] ] <> "
" - | s <- ["brig", "galley", "cargohold"] + | s <- ["brig", "galley", "cargohold"] ] versionToLByteString :: (ToHttpApiData v) => v -> LByteString @@ -1249,8 +1249,7 @@ beginPasswordReset (Public.NewPasswordReset target) = lift (liftSem $ createPasswordResetCode $ mkEmailKey target) completePasswordReset :: - ( Member AuthenticationSubsystem r - ) => + (Member AuthenticationSubsystem r) => Public.CompletePasswordReset -> Handler r () completePasswordReset req = do @@ -1769,8 +1768,7 @@ deprecatedOnboarding :: UserId -> JsonValue -> (Handler r) DeprecatedMatchingRes deprecatedOnboarding _ _ = pure DeprecatedMatchingResult deprecatedCompletePasswordReset :: - ( Member AuthenticationSubsystem r - ) => + (Member AuthenticationSubsystem r) => Public.PasswordResetKey -> Public.PasswordReset -> (Handler r) () diff --git a/services/brig/src/Brig/API/User.hs b/services/brig/src/Brig/API/User.hs index b2efc000f9..7c0397cefe 100644 --- a/services/brig/src/Brig/API/User.hs +++ b/services/brig/src/Brig/API/User.hs @@ -397,8 +397,7 @@ createUser rateLimitKey new = do lift $ do mHashedPassword <- traverse - ( liftSem . HashPassword.hashPassword8 rateLimitKey - ) + (liftSem . HashPassword.hashPassword8 rateLimitKey) new'.newUserPassword newStoredUser new' {newUserPassword = mHashedPassword} mbInv tid mbHandle domain <- viewFederationDomain @@ -1101,8 +1100,7 @@ lookupActivationCode email = do pure $ (k,) <$> c lookupPasswordResetCode :: - ( Member AuthenticationSubsystem r - ) => + (Member AuthenticationSubsystem r) => EmailAddress -> (AppT r) (Maybe PasswordResetPair) lookupPasswordResetCode = diff --git a/services/brig/src/Brig/Provider/API.hs b/services/brig/src/Brig/Provider/API.hs index b32f4b4486..603aeaa5e4 100644 --- a/services/brig/src/Brig/Provider/API.hs +++ b/services/brig/src/Brig/Provider/API.hs @@ -725,8 +725,7 @@ updateServiceWhitelist uid con tid upd = do .| C.mapM_ ( pooledMapConcurrentlyN_ 16 - ( uncurry (deleteBot uid (Just con)) - ) + (uncurry (deleteBot uid (Just con))) ) wrapClientE $ DB.deleteServiceWhitelist (Just tid) pid sid pure UpdateServiceWhitelistRespChanged @@ -852,8 +851,7 @@ addBot zuid zcon cid add = do bcl newClt maxPermClients - ( Just $ ClientCapabilityList $ Set.singleton Public.ClientSupportsLegalholdImplicitConsent - ) + (Just $ ClientCapabilityList $ Set.singleton Public.ClientSupportsLegalholdImplicitConsent) ) !>> const (StdError $ badGatewayWith "MalformedPrekeys") diff --git a/services/brig/test/integration/API/User/Auth.hs b/services/brig/test/integration/API/User/Auth.hs index b898f49bed..e1c169b527 100644 --- a/services/brig/test/integration/API/User/Auth.hs +++ b/services/brig/test/integration/API/User/Auth.hs @@ -401,8 +401,7 @@ testLoginFailure brig = do let badmail = unsafeEmailAddress "wrong" "wire.com" login brig - ( MkLogin (LoginByEmail badmail) defPassword Nothing Nothing - ) + (MkLogin (LoginByEmail badmail) defPassword Nothing Nothing) PersistentCookie !!! const 403 === statusCode diff --git a/services/brig/test/integration/Federation/End2end.hs b/services/brig/test/integration/Federation/End2end.hs index f01cb06cb7..a49dace7ef 100644 --- a/services/brig/test/integration/Federation/End2end.hs +++ b/services/brig/test/integration/Federation/End2end.hs @@ -461,8 +461,7 @@ testSendMessage brig1 brig2 galley2 cannon1 = do evtFrom e @?= EventFromUser (userQualifiedId bob) evtData e @?= EdOtrMessage - ( OtrMessage bobClient.clientId aliceClient.clientId (toBase64Text msgText) (Just "") - ) + (OtrMessage bobClient.clientId aliceClient.clientId (toBase64Text msgText) (Just "")) -- alice creates a conversation on domain 1 with bob on domain 2, then bob -- sends a message to alice @@ -524,8 +523,7 @@ testSendMessageToRemoteConv brig1 brig2 galley1 galley2 cannon1 = do evtFrom e @?= EventFromUser (userQualifiedId bob) evtData e @?= EdOtrMessage - ( OtrMessage bobClient.clientId aliceClient.clientId (toBase64Text msgText) (Just "") - ) + (OtrMessage bobClient.clientId aliceClient.clientId (toBase64Text msgText) (Just "")) testDeleteUser :: Brig -> Brig -> Galley -> Galley -> Cannon -> Http () testDeleteUser brig1 brig2 galley1 galley2 cannon1 = do diff --git a/services/galley/src/Galley/API/Action/Notify.hs b/services/galley/src/Galley/API/Action/Notify.hs index edcb90cfc0..2e65778f8b 100644 --- a/services/galley/src/Galley/API/Action/Notify.hs +++ b/services/galley/src/Galley/API/Action/Notify.hs @@ -33,8 +33,7 @@ import Wire.StoredConversation sendConversationActionNotifications :: forall tag r. - ( Member ConversationSubsystem r - ) => + (Member ConversationSubsystem r) => Sing tag -> Qualified UserId -> Bool -> diff --git a/services/galley/src/Galley/API/Federation.hs b/services/galley/src/Galley/API/Federation.hs index b6212622b2..5a5cd06db6 100644 --- a/services/galley/src/Galley/API/Federation.hs +++ b/services/galley/src/Galley/API/Federation.hs @@ -1001,8 +1001,7 @@ updateTypingIndicator origDomain TypingDataUpdateRequest {..} = do pure (either TypingDataUpdateError TypingDataUpdateSuccess ret) onTypingIndicatorUpdated :: - ( Member NotificationSubsystem r - ) => + (Member NotificationSubsystem r) => Domain -> TypingDataUpdated -> Sem r EmptyResponse diff --git a/services/galley/src/Galley/API/Internal.hs b/services/galley/src/Galley/API/Internal.hs index fd6aae3d52..e8140aa492 100644 --- a/services/galley/src/Galley/API/Internal.hs +++ b/services/galley/src/Galley/API/Internal.hs @@ -512,8 +512,7 @@ guardLegalholdPolicyConflictsH glh = do -- | Get an MLS conversation client list iGetMLSClientListForConv :: forall r. - ( Member ConversationStore r - ) => + (Member ConversationStore r) => GroupId -> Sem r ClientList iGetMLSClientListForConv gid = do diff --git a/services/galley/src/Galley/API/MLS/CheckClients.hs b/services/galley/src/Galley/API/MLS/CheckClients.hs index 9822664de1..31ff97cf2c 100644 --- a/services/galley/src/Galley/API/MLS/CheckClients.hs +++ b/services/galley/src/Galley/API/MLS/CheckClients.hs @@ -125,8 +125,8 @@ mkClientData clientInfo = infoMap = Map.fromList [ (info.clientId, key) - | info <- toList clientInfo, - key <- toList info.mlsSignatureKey + | info <- toList clientInfo, + key <- toList info.mlsSignatureKey ] } diff --git a/services/galley/src/Galley/API/MLS/GroupInfo.hs b/services/galley/src/Galley/API/MLS/GroupInfo.hs index 241dad0b2e..a10870a306 100644 --- a/services/galley/src/Galley/API/MLS/GroupInfo.hs +++ b/services/galley/src/Galley/API/MLS/GroupInfo.hs @@ -65,8 +65,7 @@ getGroupInfo lusr qcnvId = do qcnvId getGroupInfoFromLocalConv :: - ( Member ConversationStore r - ) => + (Member ConversationStore r) => (Members MLSGroupInfoStaticErrors r) => Qualified UserId -> Local ConvId -> diff --git a/services/galley/src/Galley/API/MLS/Message.hs b/services/galley/src/Galley/API/MLS/Message.hs index 0f99e0a916..052b8132b0 100644 --- a/services/galley/src/Galley/API/MLS/Message.hs +++ b/services/galley/src/Galley/API/MLS/Message.hs @@ -605,8 +605,7 @@ postMLSMessageToRemoteConv loc qusr senderClient con msg rConvOrSubId = do MLSMessageResponseOutOfSyncError e -> throw e storeGroupInfo :: - ( Member ConversationStore r - ) => + (Member ConversationStore r) => ConvOrSubConvId -> GroupInfoData -> Sem r () diff --git a/services/galley/src/Galley/App.hs b/services/galley/src/Galley/App.hs index 7808ea80ed..488d692aa7 100644 --- a/services/galley/src/Galley/App.hs +++ b/services/galley/src/Galley/App.hs @@ -396,5 +396,4 @@ evalGalley e = interpretTeamFeatureSpecialContext :: Env -> Sem (Input (FeatureDefaults LegalholdConfig) ': r) a -> Sem r a interpretTeamFeatureSpecialContext e = runInputConst - ( e ^. options . settings . featureFlags . to npProject - ) + (e ^. options . settings . featureFlags . to npProject) diff --git a/services/galley/test/integration/API.hs b/services/galley/test/integration/API.hs index e0f65f5d3a..313f11f0f5 100644 --- a/services/galley/test/integration/API.hs +++ b/services/galley/test/integration/API.hs @@ -2661,8 +2661,7 @@ leaveRemoteConvDenied = do guardComponent Galley mockReply $ LeaveConversationResponse - ( Left RemoveFromConversationErrorRemovalNotAllowed - ) + (Left RemoveFromConversationErrorRemovalNotAllowed) (resp, fedRequests) <- withTempMockFederator' mockResponses $ diff --git a/services/galley/test/integration/API/MLS/Mocks.hs b/services/galley/test/integration/API/MLS/Mocks.hs index dd1ae25889..68f9c7ab0e 100644 --- a/services/galley/test/integration/API/MLS/Mocks.hs +++ b/services/galley/test/integration/API/MLS/Mocks.hs @@ -49,8 +49,7 @@ receiveCommitMock clients = "get-not-fully-connected-backends" ~> NonConnectedBackends mempty, "get-mls-clients" ~> Set.fromList - ( map (\c -> ClientInfo c.ciClient mempty True) clients - ) + (map (\c -> ClientInfo c.ciClient mempty True) clients) ] receiveCommitMockByDomain :: [ClientIdentity] -> Mock LByteString diff --git a/services/galley/test/integration/API/MLS/Util.hs b/services/galley/test/integration/API/MLS/Util.hs index 8d6a496995..ef96d88d20 100644 --- a/services/galley/test/integration/API/MLS/Util.hs +++ b/services/galley/test/integration/API/MLS/Util.hs @@ -1165,8 +1165,7 @@ leaveCurrentConv cid qsub = case qUnqualified qsub of leaveSubConv (ciUser cid) (ciClient cid) (qsub $> cnv) subId !!! const 200 === statusCode ) - ( \rcid -> remoteLeaveCurrentConv rcid (qsub $> cnv) subId - ) + (\rcid -> remoteLeaveCurrentConv rcid (qsub $> cnv) subId) (cidQualifiedUser cid $> cid) State.modify $ \mls -> mls diff --git a/services/galley/test/integration/API/Teams.hs b/services/galley/test/integration/API/Teams.hs index 9807e6756f..6c096a0417 100644 --- a/services/galley/test/integration/API/Teams.hs +++ b/services/galley/test/integration/API/Teams.hs @@ -865,8 +865,7 @@ testDeleteBindingTeamSingleMember = do . zUser owner . zConn "conn" . json - ( newTeamMemberDeleteData (Just Util.defPassword) - ) + (newTeamMemberDeleteData (Just Util.defPassword)) ) !!! const 202 === statusCode diff --git a/services/gundeck/test/unit/MockGundeck.hs b/services/gundeck/test/unit/MockGundeck.hs index aaef773618..cb7b4f5fa8 100644 --- a/services/gundeck/test/unit/MockGundeck.hs +++ b/services/gundeck/test/unit/MockGundeck.hs @@ -606,8 +606,8 @@ mockBulkPush notifs = do let delivered :: [(Notification, [Presence])] delivered = [ (nid, prcs) - | (nid, filter (`elem` deliveredprcs) -> prcs) <- notifs, - not $ null prcs -- (sic!) (this is what gundeck currently does) + | (nid, filter (`elem` deliveredprcs) -> prcs) <- notifs, + not $ null prcs -- (sic!) (this is what gundeck currently does) ] deliveredprcs :: [Presence] deliveredprcs = filter isreachable . mconcat . fmap fakePresences $ allRecipients env diff --git a/services/spar/src/Spar/API.hs b/services/spar/src/Spar/API.hs index 58e313646e..f5f9de0d1e 100644 --- a/services/spar/src/Spar/API.hs +++ b/services/spar/src/Spar/API.hs @@ -889,7 +889,7 @@ validateIdPUpdate zusr _idpMetadata _idpId = withDebugLog "validateIdPUpdate" (J ( case fromMaybe defWireIdPAPIVersion $ previousIdP ^. SAML.idpExtraInfo . apiVersion of WireIdPAPIV1 -> IdPConfigStore.getIdPByIssuerV1Maybe newIssuer WireIdPAPIV2 -> IdPConfigStore.getIdPByIssuerV2Maybe newIssuer teamId - ) + ) <&> ( \case Just idpFound -> idpFound ^. SAML.idpId /= _idpId Nothing -> False diff --git a/services/spar/test-integration/Test/Spar/APISpec.hs b/services/spar/test-integration/Test/Spar/APISpec.hs index 0212cbd97a..6c1735c98b 100644 --- a/services/spar/test-integration/Test/Spar/APISpec.hs +++ b/services/spar/test-integration/Test/Spar/APISpec.hs @@ -979,8 +979,8 @@ specCRUDIdentityProvider = do describe "replaces an existing idp" $ forM_ [ (u, e) - | u <- [False, True], -- do we use update-by-put or update-by-post? (see below) - e <- [False, True] -- is the externalId an email address? (if not, it's a uuidv4, and the email address is stored in `emails`) + | u <- [False, True], -- do we use update-by-put or update-by-post? (see below) + e <- [False, True] -- is the externalId an email address? (if not, it's a uuidv4, and the email address is stored in `emails`) ] $ \(updateNotReplace, externalIdIsEmail) -> do let updateOrReplaceIdps :: (UserId, IdP, SAML.IdPMetadata) -> TestSpar () @@ -1466,8 +1466,7 @@ specSsoSettings = do callGetDefaultSsoCode (env ^. teSpar) `shouldRespondWith` \resp -> (statusCode resp == 200) - && ( responseJsonEither resp == Right (ssoSettings (Just idpid1)) - ) + && (responseJsonEither resp == Right (ssoSettings (Just idpid1))) -- update to 2 callSetDefaultSsoCode (env ^. teSpar) idpid2 `shouldRespondWith` \resp -> @@ -1476,8 +1475,7 @@ specSsoSettings = do callGetDefaultSsoCode (env ^. teSpar) `shouldRespondWith` \resp -> (statusCode resp == 200) - && ( responseJsonEither resp == Right (ssoSettings (Just idpid2)) - ) + && (responseJsonEither resp == Right (ssoSettings (Just idpid2))) it "allows removing the default SSO code" $ do env <- ask (userid, _teamid) <- callCreateUserWithTeam @@ -1494,8 +1492,7 @@ specSsoSettings = do callGetDefaultSsoCode (env ^. teSpar) `shouldRespondWith` \resp -> (statusCode resp == 200) - && ( responseJsonEither resp == Right (ssoSettings Nothing) - ) + && (responseJsonEither resp == Right (ssoSettings Nothing)) it "removes the default SSO code if the IdP gets removed" $ do env <- ask (userid, _teamid) <- callCreateUserWithTeam @@ -1511,8 +1508,7 @@ specSsoSettings = do callGetDefaultSsoCode (env ^. teSpar) `shouldRespondWith` \resp -> (statusCode resp == 200) - && ( responseJsonEither resp == Right (ssoSettings Nothing) - ) + && (responseJsonEither resp == Right (ssoSettings Nothing)) where ssoSettings maybeCode = object diff --git a/tools/stern/src/Stern/API.hs b/tools/stern/src/Stern/API.hs index 98e262a653..0ba12df213 100644 --- a/tools/stern/src/Stern/API.hs +++ b/tools/stern/src/Stern/API.hs @@ -455,7 +455,7 @@ getUserData uid mMaxConvs mMaxNotifs = do notfs <- ( Intra.getUserNotifications uid (fromMaybe 100 mMaxNotifs) <&> toJSON @[QueuedNotification] - ) + ) `catchE` (pure . String . T.pack . show) -- galeb From 20844d7b00bfe2a06388cf31cbfb524cd3c0953a Mon Sep 17 00:00:00 2001 From: Gautier DI FOLCO Date: Mon, 5 Jan 2026 08:53:47 +0100 Subject: [PATCH 2/4] docs: add chhangelog --- changelog.d/5-internal/WPB-22515 | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/5-internal/WPB-22515 diff --git a/changelog.d/5-internal/WPB-22515 b/changelog.d/5-internal/WPB-22515 new file mode 100644 index 0000000000..c2acd72b4b --- /dev/null +++ b/changelog.d/5-internal/WPB-22515 @@ -0,0 +1 @@ +Upgrade ormolu to match GHC 9.10. From bfc969f6e6dbf9f62b22063b924d0b505567614a Mon Sep 17 00:00:00 2001 From: Gautier DI FOLCO Date: Mon, 5 Jan 2026 10:44:29 +0100 Subject: [PATCH 3/4] Hello CI From 9f245776fd771e6858808e59ba126fa53d51ef11 Mon Sep 17 00:00:00 2001 From: Gautier DI FOLCO Date: Mon, 5 Jan 2026 12:03:15 +0100 Subject: [PATCH 4/4] Hello CI