lawful-classes-quickcheck-0.1.0.0: QuickCheck support for lawful-classes
Copyright(c) 2023 Nicolas Trangez
LicenseApache-2.0
Maintainerikke@nicolast.be
Stabilityalpha
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Lawful.QuickCheck

Description

Support code to check lawful-classes laws using QuickCheck and, optionally, Tasty.

Synopsis
  • testLaws :: TestName -> (forall a. m a -> PropertyM IO a) -> Laws m -> TestTree
  • toProperty :: (forall a. m a -> PropertyM IO a) -> Law m -> Property

Documentation

testLaws :: TestName -> (forall a. m a -> PropertyM IO a) -> Laws m -> TestTree Source #

Given Laws, create a tasty TestTree.

toProperty :: (forall a. m a -> PropertyM IO a) -> Law m -> Property Source #

Given a way to evaluate an m a into a base Monad, turn a Law into a Property.