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 the propagation of explanations when a Spec fails. #4739

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

Conversation

TimSheard
Copy link
Contributor

@TimSheard TimSheard commented Nov 6, 2024

Improved the error messages when a Spec fails.
The function explainSpec no longer drops explanations.
Added guardTypeSpec, which catches errors earlier, so there is less noise.
Function symbols like subset_ and member_ print more compactly.

Description

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated
  • 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)
  • 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)
  • 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

@TimSheard TimSheard marked this pull request as ready for review November 6, 2024 15:22
@TimSheard TimSheard requested a review from a team as a code owner November 6, 2024 15:22
@TimSheard TimSheard force-pushed the ts-better-explanations branch 5 times, most recently from 19c01e0 to 9074791 Compare November 12, 2024 17:53
@TimSheard TimSheard force-pushed the ts-better-explanations branch 2 times, most recently from 6c4f245 to 259577d Compare November 14, 2024 18:14
The function explainSpec no longer drops explanations on TypeSpec
Added guardTypeSpec, which catches errors earlier, so there is less noise.
function symbols like subset_ and member_ print a elided version of their set
arguments when they are large literals. Improves readabilty as irrelevant
information no longer overwhelms the user.
Add the constructor ExplainSpec to Specification
Assert now has type Assert :: Term fn Bool -> Pred fn
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.

3 participants