Skip to content
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

Fix monoid instance for consumer. #181

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

robinp
Copy link

@robinp robinp commented Sep 26, 2021

Commit mode needs wrapping with Maybe, otherwise it can be
unintentionally be reverted to the default async.

Commit mode needs wrapping with Maybe, otherwise it can be
unintentionally be reverted to the default async.
@robinp
Copy link
Author

robinp commented Sep 26, 2021

Slightly related to #175, fixing the surprising monoid behavior.

(ConsumerProperties m1 ll1 cb1 _) <> (ConsumerProperties m2 ll2 cb2 cup2) =
ConsumerProperties (M.union m2 m1) (ll2 `mplus` ll1) (cb1 `mplus` cb2) cup2
(ConsumerProperties m1 ll1 cb1 cup1) <> (ConsumerProperties m2 ll2 cb2 cup2) =
ConsumerProperties (M.union m2 m1) (ll2 `mplus` ll1) (cb1 `mplus` cb2) (cup1 `mplus` cup2)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be (cup2 `mplus` cup1) instead? Otherwise it'll be impossible to override once set...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants