@hackage quickcheck-combinators0.0.3
Simple type-level combinators for augmenting QuickCheck instances.
Installation
Dependencies (3)
- QuickCheck
- base >=4.8 && <5
- unfoldable-restricted >=0.0.1 Show all…
Dependents (1)
@hackage/ltext
Simply wrap the type you want to generate (assuming it satisfies all the necessary constraints) to refine the terms generated:
{-# LANGUAGE DataKinds #-}
import Data.Set (Set)
import Test.QuickCheck
import Test.QuickCheck.Instances
import GHC.TypeLits
instance Arbitrary LinearEquation where
arbitrary = do
vars <- arbitrary :: Gen (AtLeast 3 Set String)
-- ...