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

Intelligent derivations of Semigroup and Monoid for Wingman #1671

Merged
merged 10 commits into from
Apr 6, 2021

Conversation

isovector
Copy link
Collaborator

This PR gives Wingman new special "known tactics" for synthesizing Semigroup and Monoid instances. They do exactly what you'd expect --- passing the buck to the underlying instances for every value inside. Special to this tactic, Wingman will leave holes for any argument that it can't work out.

Behind the scenes, there's quite a lot going on here. Lots of machinery needed to be moved around to get access to the instance environment, and to make sure we can find the right things in scope. Nothing too interesting, but it is a little janky --- I had to rewrite a chunk of the instance lookup machinery (see Wingman.Context).

@isovector
Copy link
Collaborator Author

Looks like the HsExpr pretty printer changed in 8.10, which makes one of the tests due to different spacing. Grrrrr

Copy link
Member

@jneira jneira left a comment

Choose a reason for hiding this comment

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

LGTM

@isovector isovector added the merge me Label to trigger pull request merge label Apr 6, 2021
@mergify mergify bot merged commit c67b233 into haskell:master Apr 6, 2021
@isovector isovector deleted the smart-mempty-auto branch May 21, 2021 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Label to trigger pull request merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants