Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zudov/purescript-strongcheck-generics
Generics for purescript-strongcheck
https://github.com/zudov/purescript-strongcheck-generics
Last synced: 12 days ago
JSON representation
Generics for purescript-strongcheck
- Host: GitHub
- URL: https://github.com/zudov/purescript-strongcheck-generics
- Owner: zudov
- License: bsd-3-clause
- Created: 2015-08-23T19:25:27.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2020-09-27T18:44:13.000Z (about 4 years ago)
- Last Synced: 2024-10-10T07:18:34.369Z (27 days ago)
- Language: PureScript
- Homepage:
- Size: 29.3 KB
- Stars: 4
- Watchers: 3
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# purescript-strongcheck-generics
[![purescript-strongcheck-generics on Pursuit](https://pursuit.purescript.org/packages/purescript-strongcheck-generics/badge)](http://pursuit.purescript.org/packages/purescript-strongcheck-generics)
[![Latest release](https://img.shields.io/bower/v/purescript-strongcheck-generics.svg)](https://github.com/zudov/purescript-strongcheck-generics/releases)
[![Build Status](https://travis-ci.org/zudov/purescript-strongcheck-generics.svg?branch=master)](https://travis-ci.org/zudov/purescript-strongcheck-generics)Generic deriving for `Arbitrary`/`CoArbitrary`, and generation of `GenericSpine`/`GenericSignature`.
**Warning:** It was noticed that generating a spine for deeply recursive data structures (particularly those
that include arrays of themselves) can hang running indefinetely. See [issue 5](https://github.com/zudov/purescript-strongcheck-generics/issues/5) for details.## Installation
```shell
bower install purescript-strongcheck-generics
```## Example
```purescript
module Main whereimport Prelude
import Data.Generic
import Test.StrongCheck
import Test.StrongCheck.Gen
import Test.StrongCheck.Genericdata Tree a = Leaf | Branch { value :: a, kids :: Array (Tree a) }
derive instance genericTree :: (Generic a) => Generic (Tree a)
instance showTree :: (Show a, Generic a) => Show (Tree a) where
show = gShowmain = do
showSample (gArbitrary :: Gen (Tree Int))
```[Output](https://travis-ci.org/zudov/purescript-strongcheck-generics/builds/91160401#L733)
## Documentation
- [Test.StrongCheck.Generic](docs/Test/StrongCheck/Generic.md)