-
Notifications
You must be signed in to change notification settings - Fork 157
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
Make ErrorSpec take a (NonEmpty String) rather than [String] #4473
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like in base for 8.10.7 there is no singleton
and append
exported from Data.List.NonEmpty , so I think you might need to replace these with the constructor :|
and <>
, respectively, on order to make the PR compile for 8.10.7.
45b7fab
to
01f0866
Compare
01f0866
to
01c7cfd
Compare
There was a problem hiding this 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 but I think you need to change the singleton
and append
from NonEmpty in order to be able to merge it.
6cee0b3
to
7127dd0
Compare
7b4f4a4
to
e497b4f
Compare
AssertExplain, FalseSpec and other Pred modifers do too.
e497b4f
to
ddc8ff8
Compare
All too often, when running a test, the test fails, and the explanation of the failure is the empty list ([]) of explanations.
Try as hard as I could, I could never trackdown where this list was coming from.
One of the design goals of the constrained generators was that failures should be explained.
So under the better design goal, that every failure should have a non-empty explanation, I have changed the
type of ErrorSpec from
ErrorSpec :: [String] -> Specification fn a
ErrorSpec :: Data.List.NonEmpty String -> Specification fn a
Checklist
.cabal
andCHANGELOG.md
files according to theversioning process.
.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)CHANGELOG.md
for the affected packages. New section is never added with the code changes. (See RELEASING.md)fourmolu
(usescripts/fourmolize.sh
)scripts/cabal-format.sh
)hie.yaml
has been updated (usescripts/gen-hie.sh
)