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

Improve error handling in constrained genFromSpec #4822

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

teodanciu
Copy link
Contributor

  • use the existing error handling mechanism from constrained
  • remove usage of unsafePerformIO
  • remove incorrectly placed catch and catching of AnyException

Closes #4802

Description

Checklist

  • Commits in meaningful sequence and with useful messages
  • Tests added or updated when needed
  • CHANGELOG.md files updated for packages with externally visible changes

    New section is never added with the code changes. (See RELEASING.md)
  • Versions updated in .cabal and CHANGELOG.md files when necessary, according to the
    versioning process.
  • Version bounds in .cabal files updated when necessary

    If you change the bounds in a cabal file, that package itself must have a version increase. (See RELEASING.md)
  • Code formatted (use scripts/fourmolize.sh)
  • Cabal files formatted (use scripts/cabal-format.sh)
  • hie.yaml updated (use scripts/gen-hie.sh)
  • Self-reviewed the diff

Copy link
Collaborator

@lehins lehins left a comment

Choose a reason for hiding this comment

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

LGTM

libs/constrained-generators/src/Constrained/Base.hs Outdated Show resolved Hide resolved
libs/constrained-generators/src/Constrained/Base.hs Outdated Show resolved Hide resolved
@teodanciu teodanciu force-pushed the td/improve-genFromSpec branch from 1dcb89a to e3d9118 Compare January 10, 2025 12:28
@teodanciu teodanciu marked this pull request as ready for review January 10, 2025 12:29
@teodanciu teodanciu requested a review from a team as a code owner January 10, 2025 12:29
* use the existing error handling mechanism from constrained
* remove usage of unsafePerformIO
* remove incorrectly placed `catch` and catching of `AnyException`
@teodanciu teodanciu force-pushed the td/improve-genFromSpec branch from e3d9118 to 7ee79df Compare January 10, 2025 12:29
@teodanciu teodanciu enabled auto-merge (rebase) January 10, 2025 12:30
@teodanciu teodanciu merged commit 10687c7 into master Jan 10, 2025
153 of 156 checks passed
@teodanciu teodanciu deleted the td/improve-genFromSpec branch January 10, 2025 14:39
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.

Fix incorrect usage of catch in pure code
2 participants