@hackage quickcheck-classes0.6.5.0

QuickCheck common typeclasses

  • Installation

  • Dependencies (13)

  • Dependents (46)

    @hackage/scheduler, @cardano/cardano-data, @hackage/poly, @cardano/marlowe-object, @hackage/disjoint-containers, @hackage/quickcheck-monoid-subclasses, Show all…
  • Package Flags

      aeson
       (on by default)

      You can disable the use of the aeson package using `-f-aeson`.

      This may be useful for accelerating builds in sandboxes for expert users.

      semigroupoids
       (on by default)

      You can disable the use of the semigroupoids package using `-f-semigroupoids`.

      This may be useful for accelerating builds in sandboxes for expert users.

      semirings
       (on by default)

      You can disable the use of the semirings package using `-f-semirings`.

      This may be useful for accelerating builds in sandboxes for expert users.

      vector
       (on by default)

      You can disable the use of the vector package using `-f-vector`.

      This may be useful for accelerating builds in sandboxes for expert users.

      unary-laws
       (on by default)

      Include infrastructure for testing class laws of unary type constructors. It is required that this flag match the value that the `unary-laws` flag was given when building `quickcheck-classes-base`.

      binary-laws
       (on by default)

      Include infrastructure for testing class laws of binary type constructors. It is required that this flag match the value that the `unary-laws` flag was given when building `quickcheck-classes-base`. Disabling `unary-laws` while keeping `binary-laws` enabled is an unsupported configuration.

This library provides QuickCheck properties to ensure that typeclass instances adhere to the set of laws that they are supposed to. There are other libraries that do similar things, such as `genvalidity-hspec` and checkers. This library differs from other solutions by not introducing any new typeclasses that the user needs to learn.

Note: on GHC < 8.5, this library uses the higher-kinded typeclasses (Data.Functor.Classes.Show1, Data.Functor.Classes.Eq1, Data.Functor.Classes.Ord1, etc.), but on GHC >= 8.5, it uses `-XQuantifiedConstraints` to express these constraints more cleanly.