| Copyright | (c) 2018 Rudy Matela |
|---|---|
| License | 3-Clause BSD (see the file LICENSE) |
| Maintainer | Rudy Matela <rudy@matela.com.br> |
| Safe Haskell | Safe |
| Language | Haskell2010 |
Test.LeanCheck.Generic
Description
This module is part of LeanCheck, a simple enumerative property-based testing library.
This is an experimental module for deriving Listable instances through
GHC's generic.
If you rather do this through Template Haskell please see: Test.LeanCheck.Derive.
Synopsis
- genericList :: (Generic a, Listable' (Rep a)) => [a]
- genericTiers :: (Generic a, Listable' (Rep a)) => [[a]]
Documentation
genericList :: (Generic a, Listable' (Rep a)) => [a] Source #
A generic implementation of list for instances of Generic.
Use it to define your Listable instances like so:
instance Listable MyType where list = genericList
Consider using genericTiers instead of this
(unless you know what you're doing).