-
Notifications
You must be signed in to change notification settings - Fork 701
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
Turn 'configPrograms' field into a 'Last'-monoid #3195
Conversation
040ac42
to
c9e08f9
Compare
Still fails (on < 7.6):
|
@23Skidoo that one's weird... I'm investigating... |
This implements the suggestions mentioned at haskell#3169 (comment) The main benefit of this change is turning 'ConfigFlags' into a uniform product-type suitable for generic derivation of pointwise `Semigroup`/`Monoid` instances. NB: This changes the `Binary` serialisation of `ConfigFlags` since there's now an additional `Maybe` inserted in `configPrograms`'s type
c9e08f9
to
62c3aa6
Compare
@23Skidoo I'm quite optimistic the builds will work this time... |
@@ -404,7 +404,7 @@ configAbsolutePaths f = | |||
|
|||
defaultConfigFlags :: ProgramConfiguration -> ConfigFlags | |||
defaultConfigFlags progConf = emptyConfigFlags { | |||
configPrograms = progConf, | |||
configPrograms = pure progConf, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last' progConf
would be more readable IMO.
Turn 'configPrograms' field into a 'Last'-monoid
Merged, thanks! I'll need to check whether this patch breaks any setup scripts before it can be cherry-picked into 1.24 as well ( |
Yes, I don't think it does, but it never hurts to double-check. |
This implements the suggestions mentioned at
#3169 (comment)
The main benefit of this change is turning 'ConfigFlags' into a uniform
product-type suitable for generic derivation of pointwise
Semigroup
/Monoid
instances.NB: This changes the
Binary
serialisation ofConfigFlags
since there'snow an additional
Maybe
inserted inconfigPrograms
's type