https://github.com/athanclark/quickcheck-combinators
type-level combinators for quickcheck instances
https://github.com/athanclark/quickcheck-combinators
haskell quickcheck quickcheck-combinators typelevel-programming
Last synced: 5 months ago
JSON representation
type-level combinators for quickcheck instances
- Host: GitHub
- URL: https://github.com/athanclark/quickcheck-combinators
- Owner: athanclark
- License: bsd-3-clause
- Created: 2016-03-28T21:48:03.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2023-09-22T09:45:17.000Z (over 2 years ago)
- Last Synced: 2025-08-03T09:00:04.901Z (6 months ago)
- Topics: haskell, quickcheck, quickcheck-combinators, typelevel-programming
- Language: Haskell
- Size: 17.6 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# quickcheck-combinators
Simply wrap the type you want to generate (assuming it satisfies all the necessary constraints) to refine the terms generated:
```haskell
{-# 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)
-- ...
```