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

constrained-generators: Fix ifElse dependencies #4297

Merged
merged 3 commits into from
Apr 29, 2024

Conversation

MaximilianAlgehed
Copy link
Collaborator

@MaximilianAlgehed MaximilianAlgehed commented Apr 25, 2024

Description

This solves some thorny issues that @TimSheard was having with generating things that have a lot of ifElse in them. It generally doesn't make sense to resolve the if scrutinee after resolving the cases - unlike in caseOn where you're inspecting variables so you end up deferring things more.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated
  • When applicable, versions are updated in .cabal and CHANGELOG.md files according to the
    versioning process.
  • The version bounds in .cabal files for all affected packages are updated. If you change the bounds in a cabal file, that package itself must have a version increase. (See RELEASING.md)
  • All visible changes are prepended to the latest section of a CHANGELOG.md for the affected packages. New section is never added with the code changes. (See RELEASING.md)
  • Code is formatted with fourmolu (use scripts/fourmolize.sh)
  • Cabal files are formatted (use scripts/cabal-format.sh)
  • hie.yaml has been updated (use scripts/gen-hie.sh)
  • Self-reviewed the diff

@MaximilianAlgehed MaximilianAlgehed force-pushed the PR-fix-ifElse-dependencies branch from 35c43f4 to 57a9aca Compare April 25, 2024 07:57
@MaximilianAlgehed MaximilianAlgehed changed the title Fix ifElse dependencies constrained-generators: Fix ifElse dependencies Apr 25, 2024
@MaximilianAlgehed MaximilianAlgehed force-pushed the PR-fix-ifElse-dependencies branch from ce1fac2 to 3fcc07d Compare April 25, 2024 10:37
@MaximilianAlgehed MaximilianAlgehed marked this pull request as ready for review April 25, 2024 11:15
@MaximilianAlgehed MaximilianAlgehed force-pushed the PR-fix-ifElse-dependencies branch from 299a754 to cda7eef Compare April 25, 2024 14:27
@MaximilianAlgehed MaximilianAlgehed force-pushed the PR-fix-ifElse-dependencies branch 4 times, most recently from 8298ad5 to 7b11e4e Compare April 26, 2024 05:53
@MaximilianAlgehed MaximilianAlgehed force-pushed the PR-fix-ifElse-dependencies branch from 7b11e4e to 6dff0b4 Compare April 26, 2024 05:54
@lehins lehins requested a review from Soupstraw April 29, 2024 15:54
Copy link
Contributor

@TimSheard TimSheard 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 to me. Good to add a comment about intended uses of new features.

@lehins lehins disabled auto-merge April 29, 2024 19:41
@lehins lehins enabled auto-merge (squash) April 29, 2024 19:42
@MaximilianAlgehed MaximilianAlgehed enabled auto-merge (squash) April 29, 2024 20:54
@MaximilianAlgehed MaximilianAlgehed merged commit ad4afe1 into master Apr 29, 2024
124 checks passed
@MaximilianAlgehed MaximilianAlgehed deleted the PR-fix-ifElse-dependencies branch April 29, 2024 21:04
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