An open API service indexing awesome lists of open source software.

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

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)
-- ...
```