mirror of
https://github.com/Lysxia/generic-random.git
synced 2024-09-20 22:07:16 +03:00
Update README
This commit is contained in:
parent
6c5df3a279
commit
b2faea5ba8
@ -3,6 +3,7 @@ Generic random generators
|
||||
|
||||
Define sized random generators for almost any type.
|
||||
|
||||
```haskell
|
||||
{-# LANGUAGE DeriveDataTypeable #-}
|
||||
import Data.Data
|
||||
import Test.QuickCheck
|
||||
@ -15,6 +16,7 @@ Define sized random generators for almost any type.
|
||||
arbitrary = sized (generator asGen)
|
||||
|
||||
main = sample (arbitrary :: Gen Term)
|
||||
```
|
||||
|
||||
- Objects of the same size (number of constructors) occur with the same
|
||||
probability (see Duchon et al., references below).
|
||||
|
Loading…
Reference in New Issue
Block a user