@hackage / explainable-predicates

Predicates that can explain themselves.

Latest0.1.2.4

About

Metadata

  • Last updated , by ChrisSmith
  • License BSD-3-Clause
  • Categories Testing
  • Maintained by: Chris Smith <cdsmith@gmail.com>

  • Lottery factor: 0

Links

Installation

Tested Compilers

  1. 9.8.1
  2. 9.6.2
  3. 9.4.5
  4. 9.2.8
  5. 9.0.2
  6. 8.10.7
  7. 8.8.4
  8. 8.6.5

Package Flags

Use the -f option with cabal commands to enable flags

    regex (on by default)

    Enable regular expression matching

    containers (on by default)

    Enable container matching, which depends on mono-traversable

    quickcheck (on by default)

    Enable QuickCheck integration

    hunit (on by default)

    Enable HUnit/Hspec integration

    dev (off by default)

    Developer build

Readme

explainable-predicates - Predicates that can explain themselves

CI Hackage

Explainable predicates are essentially functions from types to Bool which can additionally describe themselves and explain why an argument does or doesn't match. They are intended to be used during unit tests to provide better error messages when tests fail. For example, if a collection is missing an element, an explainable predicate can tell you which element is missing.

FAQ

Here are a few tips for making the most of explainable-predicates.

Which GHC versions are supported?

explainable-predicates is tested with GHC versions from 8.6 through 9.4.