-
Notifications
You must be signed in to change notification settings - Fork 335
[WPB-5175] upgrade to ghc 9.4 #3679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 34 commits
c108bbd
fbeca69
7990874
6b6497d
447b4cc
52be7bb
f6c0d75
0c0ea75
86cd4af
6bd5be1
d6e69d9
06ae50e
a809b68
52ead1f
9709c6d
071dcca
b3e3a4d
c8ccac6
dd387cd
275f0eb
639870b
418856c
b83fba4
b03792a
42ae7f9
aeb53bd
8c9a3a2
fc5d08c
237fc8e
01470fe
2957fac
a4289f1
1a742d6
70b2add
a6100d3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| upgrade the GHC version to GHC 9.4 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,6 @@ module Testlib.App where | |
| import Control.Monad.Reader | ||
| import Control.Retry qualified as Retry | ||
| import Data.Aeson hiding ((.=)) | ||
| import Data.Functor ((<&>)) | ||
| import Data.IORef | ||
| import Data.Text qualified as T | ||
| import Data.Yaml qualified as Yaml | ||
|
|
@@ -44,9 +43,13 @@ readServiceConfig = readServiceConfig' . configName | |
| readServiceConfig' :: String -> App Value | ||
| readServiceConfig' srvName = do | ||
| cfgFile <- | ||
| asks (.servicesCwdBase) <&> \case | ||
| Nothing -> "/etc/wire" </> srvName </> "conf" </> (srvName <> ".yaml") | ||
| Just p -> p </> srvName </> (srvName <> ".integration.yaml") | ||
| asks | ||
| ( ( \case | ||
| Nothing -> "/etc/wire" </> srvName </> "conf" </> (srvName <> ".yaml") | ||
| Just p -> p </> srvName </> (srvName <> ".integration.yaml") | ||
| ) | ||
| . (.servicesCwdBase) | ||
| ) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see that you made this change in many places. To me it doesn't look better than the previous version. What's the reason for it?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hlint got an update :/
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I want to propose that we ignore this HLint warning. This is unparseable to me 😢 |
||
|
|
||
| eith <- liftIO (Yaml.decodeFileEither cfgFile) | ||
| case eith of | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -296,6 +296,7 @@ instance HasOpt doc => FieldFunctor doc Maybe where | |
|
|
||
| -- | A schema for a one-field JSON object. | ||
| field :: | ||
| forall doc' doc a b. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are explicit foralls necessary now?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to scope the type variables to be able to use type applications. I'm not sure what change in GHC caused this. Perhaps it had something to do with the Deepsubsumption change |
||
| HasField doc' doc => | ||
| Text -> | ||
| SchemaP doc' A.Value A.Value a b -> | ||
|
|
@@ -304,6 +305,7 @@ field = fieldOver id | |
|
|
||
| -- | A schema for a JSON object with a single optional field. | ||
| optField :: | ||
| forall doc doc' a b. | ||
| (HasOpt doc, HasField doc' doc) => | ||
| Text -> | ||
| SchemaP doc' A.Value A.Value a b -> | ||
|
|
@@ -312,6 +314,7 @@ optField = fieldF | |
|
|
||
| -- | Generalization of 'optField' with 'FieldFunctor'. | ||
| fieldF :: | ||
| forall doc' doc f a b. | ||
| (HasField doc' doc, FieldFunctor doc f) => | ||
| Text -> | ||
| SchemaP doc' A.Value A.Value a b -> | ||
|
|
@@ -362,32 +365,35 @@ fieldOver l name = fmap runIdentity . fieldOverF l name | |
| -- | Like 'field', but apply an arbitrary function to the | ||
| -- documentation of the field. | ||
| fieldWithDocModifier :: | ||
| forall doc' doc a b. | ||
| HasField doc' doc => | ||
| Text -> | ||
| (doc' -> doc') -> | ||
| SchemaP doc' A.Value A.Value a b -> | ||
| SchemaP doc A.Object [A.Pair] a b | ||
| fieldWithDocModifier name modify sch = field name (over doc modify sch) | ||
| fieldWithDocModifier name modify sch = field @doc' @doc name (over doc modify sch) | ||
|
MangoIV marked this conversation as resolved.
|
||
|
|
||
| -- | Like 'optField', but apply an arbitrary function to the | ||
| -- documentation of the field. | ||
| optFieldWithDocModifier :: | ||
| forall doc doc' a b. | ||
| (HasOpt doc, HasField doc' doc) => | ||
| Text -> | ||
| (doc' -> doc') -> | ||
| SchemaP doc' A.Value A.Value a b -> | ||
| SchemaP doc A.Object [A.Pair] a (Maybe b) | ||
| optFieldWithDocModifier name modify sch = optField name (over doc modify sch) | ||
| optFieldWithDocModifier name modify sch = optField @doc @doc' name (over doc modify sch) | ||
|
|
||
| -- | Like 'fieldF', but apply an arbitrary function to the | ||
| -- documentation of the field. | ||
| fieldWithDocModifierF :: | ||
| forall doc' doc f a b. | ||
| (HasField doc' doc, FieldFunctor doc f) => | ||
| Text -> | ||
| (doc' -> doc') -> | ||
| SchemaP doc' A.Value A.Value a b -> | ||
| SchemaP doc A.Object [A.Pair] a (f b) | ||
| fieldWithDocModifierF name modify sch = fieldF name (over doc modify sch) | ||
| fieldWithDocModifierF name modify sch = fieldF @doc' @doc name (over doc modify sch) | ||
|
|
||
| -- | Change the input type of a schema. | ||
| (.=) :: Profunctor p => (a -> a') -> p a' b -> p a b | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.