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

[#265] Make SuperComposition less brittle #267

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

Conversation

treeowl
Copy link

@treeowl treeowl commented May 11, 2022

  • Use type families and an auxiliary class to make instance resolution
    for SuperComposition more robust and predictable. Fixes SuperComposition instance resolution is brittle #265.

  • Make the first argument of ... a function unconditionally, before
    instance selection. This can theoretically improve inference slightly,
    though it probably doesn't have much impact in practice.

Description

Related issues(s)

✓ Checklist for your Pull Request

Ideally a PR has all of the checkmarks set.

If something in this list is irrelevant to your PR, you should still set this
checkmark indicating that you are sure it is dealt with (be that by irrelevance).

  • I made sure my PR addresses a single concern, or multiple concerns which
    are inextricably linked. Otherwise I should open multiple PR's.
  • If your PR fixes/relates to an open issue then the description should
    reference this issue. See also auto linking on
    github
    .

Related changes (conditional)

  • Tests

    • If I added new functionality, I added tests covering it.
    • If I fixed a bug, I added a regression test to prevent the bug from
      silently reappearing again.
  • Documentation

    I checked whether I should update the docs and did so if necessary:

  • Record your changes

    • I added an entry to the changelog if my changes are visible to the users
      and
    • provided a migration guide for breaking changes if possible

Stylistic guide (mandatory)

  • My commit history is clean (only contains changes relating to my
    issue/pull request and no reverted-my-earlier-commit changes) and commit
    messages start with identifiers of related issues in square brackets.

    Example: [#42] Short commit description

    If necessary both of these can be achieved even after the commits have been
    made/pushed using rebase and squash.

* Use type families and an auxiliary class to make instance resolution
  for `SuperComposition` more robust and predictable. Fixes serokell#265.

* Make the first argument of `...` a function unconditionally, before
  instance selection. This can theoretically improve inference slightly,
  though it probably doesn't have much impact in practice.
@treeowl treeowl force-pushed the dfeuer/#265-coherent-super-composition branch from b26edde to 0dd38bd Compare May 11, 2022 18:30
@treeowl
Copy link
Author

treeowl commented May 11, 2022

Is a migration guide required, or is the changelog entry sufficient here? If one is required, where does it go?

@treeowl
Copy link
Author

treeowl commented May 11, 2022

I don't know how to write a regression test for #265; it's both compile-time and subtle. Is that required for this?

@treeowl
Copy link
Author

treeowl commented May 11, 2022

Argh! I think there might be a coherence issue that needs to be resolved. Trying to get inference both ways may be fundamentally wrong.

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.

SuperComposition instance resolution is brittle
1 participant