Revision history for property-matchers
0.7
- Use the
Show constraint on equals to produce a better printed actual, not just expected.
0.6
- Add
Show constraint to equals and other comparison properties to improve error messages in cases where rtti-derived printing is not as good.
0.5
- Add
notEquals property.
- Delete
atIndex, endingWith, and startingWith. These can easily be replaced by prisms via match, like with match (ix k), match _head, and match _last.
- Delete
bool in favor of equals True.
- Export
Getting in case it's useful.
- Add some doctests.
- Update docs.
0.4
- Fix
allOf1 which would fail on a non-empty input, instead of the opposite
- Add
anyOf
- Rename
allTrue to checkAll
0.3
- Add
fails function, for asserting that an exception is thrown
- Replace
propful with alignExact
- Add
alignLax generalizing alignExact
- Add
elem
- Add fixity for
:=> to be compatible with ?
- Add comparisons other than
equals
0.2
- Add
bool function
- Add hspec + smallcheck test suite
- Add
branch for non-backtracking disjunction of properties
- Monomorphize
fail, succeed, assess, branch for ease of use in hspec
- Rename
PropertyFailed exception type to PropertyException to recognize the new case for branch
- Add
type Assertion = IO ()
- Add a few pragmas
- Reorder
PropertyMatchers module for intelligibility
0.1
- Rename to property-matchers
- Rename kth to atIndex
- Change error message formatting for predicate failure
- Rename multiple functions to shorter names with the intent that predicate-transformers be imported qualified.
In particular
also renamed to and, otherHand renamed to or, etc.
- Delete
lens and mtl dependencies.
- Delete
soleElementOf, for lack of use in favor of match.
- Rename
Predicatory to Boolish for ease of reading.
- Delete
Exceptional class, folding it into the newly renamed Boolish.
- Delete
predJust, predLeft, and predRight in favor of match uses.
- Add predicate failure error messages that include the actual value under test and a message explaining what was expected.
- Rename
just, left, and right to predJust, predLeft, predRight
- Change
? to right associative so that it works with ..
- Add
? back in as a useful operator to work with &; & can be used as a predicate applicator, and ? can be used as a predicate transformer applicator, allowing for a form of infix binary application like x & f ? y = f x y.
- Add
match back in as a type-restricted alias for soleElementOf.
- Rename
sole to soleElement
- Add
?, an infix function application operator with lower
precedence than !.
- Add
satAll = foldr also continue.
- Add documentation.
- Rename
onlyContains to sole. Add soleOf, generalizing over Folds.
soleOf is likely a better replacement for match than allOf1 was.
- Exchange
INLINABLE pragmas for -fexpose-all-unfoldings.
- Implement
traceFailFunShow.
- Change
Exceptional's method assess to make it possible to implement for functional predicates, and delete traceFailFun, now redundant.
- Rename
oneOfTwo to otherHand, for easier reading.
- Set
also and otherHand precedences to those of && and ||
respectively. That makes them work better with the precedence of
!, allowing easier composition.
- Rename
only to onlyContains, for easier reading and to avoid a
name conflict with Control.Lens.only.
- Set
! precedence to be equal to that of ..
- Add
equals predicate.
- Delete
match. allOf1 does the same thing more generally, with
Fold instead of Prism.
- Make
otherHand stop catching async exceptions. Otherwise a thread
being killed may appear as a predicate failure.
- Add instance
Predicatory (e -> a). This will allow for adding extra
parameters to predicates, making it easier to compose them; maybe
these are called "functional predicates".
- Added
traceFailFun. This version of traceFail works on functional
predicates.
- Tupling sugar renamed from
==> to :=>, to allow it to be a pattern synonym.
- Minor code style changes.
- First version. Released on an unsuspecting world.