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

Query.hs: simplify implementation with a few new functions and code sharing #993

Merged
merged 2 commits into from
Dec 13, 2024

Conversation

smelc
Copy link
Contributor

@smelc smelc commented Dec 12, 2024

Changelog

- description: |
    Simplify implementation of queries with a few new functions and code sharing
# uncomment types applicable to the change:
  type:
  # - feature        # introduces a new feature
  # - breaking       # the API has changed in a breaking way
  # - compatible     # the API has changed but is non-breaking
  # - optimisation   # measurable performance improvements
  - refactoring    # QoL changes
  # - bugfix         # fixes a defect
  # - test           # fixes/modifies tests
  # - maintenance    # not directly related to the code
  # - release        # related to a new release preparation
  # - documentation  # change in code docs, haddocks...

Context

Code in Query.hs is hard to maintain and shuffle because of the noise of error handling. This PR aims to improve a bit on that.

How to trust this PR

  • It's refactoring only
  • It's +70/-167 🙂

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. See Running tests for more details
  • Self-reviewed the diff

Copy link
Contributor

@palas palas left a comment

Choose a reason for hiding this comment

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

I think I found a potential issue (maybe it is fine, but worth double checking). Other than that it looks good

@smelc smelc force-pushed the smelc/simplify-queries-code branch from d249909 to c730206 Compare December 13, 2024 08:57
Copy link
Contributor

@palas palas left a comment

Choose a reason for hiding this comment

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

Looks good 👍

@smelc smelc enabled auto-merge December 13, 2024 14:23
@smelc smelc added this pull request to the merge queue Dec 13, 2024
Merged via the queue into master with commit 3388452 Dec 13, 2024
26 checks passed
@smelc smelc deleted the smelc/simplify-queries-code branch December 13, 2024 17:46
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