QuickCheckVariant-0.1.0.3: Generator of "valid" and "invalid" data in a type class

Copyright(c) Jorge Santiago Alvarez Cuadros, 2015
LicenseGPL-3
Maintainersanjorgek@ciencias.unam.mx
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
LanguageHaskell98

Test.QuickCheck.Variant

Description

To get random "invalid" and "valid" data

Synopsis

Documentation

class Variant a where Source #

You can define

>>> instance (Varaint a) => Arbitrary a where {arbitrary = oneof [valid, invalid]}

Minimal complete definition

valid, invalid

Methods

valid :: Gen a Source #

invalid :: Gen a Source #

Instances

Variant a => Variant [a] Source # 

Methods

valid :: Gen [a] Source #

invalid :: Gen [a] Source #

Variant a => Variant (Maybe a) Source # 

Methods

valid :: Gen (Maybe a) Source #

invalid :: Gen (Maybe a) Source #

(Variant a, Variant b) => Variant (Either a b) Source # 

Methods

valid :: Gen (Either a b) Source #

invalid :: Gen (Either a b) Source #

(Variant a, Variant b) => Variant (a, b) Source # 

Methods

valid :: Gen (a, b) Source #

invalid :: Gen (a, b) Source #

(Variant a, Variant b, Variant c) => Variant (a, b, c) Source # 

Methods

valid :: Gen (a, b, c) Source #

invalid :: Gen (a, b, c) Source #