compdata-0.13.1: Compositional Data Types
Copyright(c) 2011 Patrick Bahr
LicenseBSD3
MaintainerPatrick Bahr <paba@diku.dk>
Stabilityexperimental
Portabilitynon-portable (GHC Extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Comp.Arbitrary

Description

This module defines generation of arbitrary values for signatures, which lifts to generating arbitrary terms.

Synopsis

Documentation

class ArbitraryF f where Source #

Signature arbitration. An instance ArbitraryF f gives rise to an instance Arbitrary (Term f).

Minimal complete definition

Nothing

Methods

arbitraryF' :: Arbitrary v => [(Int, Gen (f v))] Source #

arbitraryF :: Arbitrary v => Gen (f v) Source #

shrinkF :: Arbitrary v => f v -> [f v] Source #

Instances

Instances details
ArbitraryF Maybe Source # 
Instance details

Defined in Data.Comp.Arbitrary

ArbitraryF [] Source # 
Instance details

Defined in Data.Comp.Arbitrary

Methods

arbitraryF' :: Arbitrary v => [(Int, Gen [v])] Source #

arbitraryF :: Arbitrary v => Gen [v] Source #

shrinkF :: Arbitrary v => [v] -> [[v]] Source #

ArbitraryF f => ArbitraryF (Context f) Source #

This lifts instances of ArbitraryF to instances of ArbitraryF for the corresponding context functor.

Instance details

Defined in Data.Comp.Arbitrary

Methods

arbitraryF' :: Arbitrary v => [(Int, Gen (Context f v))] Source #

arbitraryF :: Arbitrary v => Gen (Context f v) Source #

shrinkF :: Arbitrary v => Context f v -> [Context f v] Source #

Arbitrary b => ArbitraryF ((,) b) Source # 
Instance details

Defined in Data.Comp.Arbitrary

Methods

arbitraryF' :: Arbitrary v => [(Int, Gen (b, v))] Source #

arbitraryF :: Arbitrary v => Gen (b, v) Source #

shrinkF :: Arbitrary v => (b, v) -> [(b, v)] Source #

(Arbitrary b, Arbitrary c) => ArbitraryF ((,,) b c) Source # 
Instance details

Defined in Data.Comp.Arbitrary

Methods

arbitraryF' :: Arbitrary v => [(Int, Gen (b, c, v))] Source #

arbitraryF :: Arbitrary v => Gen (b, c, v) Source #

shrinkF :: Arbitrary v => (b, c, v) -> [(b, c, v)] Source #

(ArbitraryF f, Arbitrary p) => ArbitraryF (f :&: p) Source # 
Instance details

Defined in Data.Comp.Arbitrary

Methods

arbitraryF' :: Arbitrary v => [(Int, Gen ((f :&: p) v))] Source #

arbitraryF :: Arbitrary v => Gen ((f :&: p) v) Source #

shrinkF :: Arbitrary v => (f :&: p) v -> [(f :&: p) v] Source #

(ArbitraryF f, ArbitraryF g) => ArbitraryF (f :+: g) Source #

Instances of ArbitraryF are closed under forming sums.

Instance details

Defined in Data.Comp.Arbitrary

Methods

arbitraryF' :: Arbitrary v => [(Int, Gen ((f :+: g) v))] Source #

arbitraryF :: Arbitrary v => Gen ((f :+: g) v) Source #

shrinkF :: Arbitrary v => (f :+: g) v -> [(f :+: g) v] Source #

(Arbitrary b, Arbitrary c, Arbitrary d) => ArbitraryF ((,,,) b c d) Source # 
Instance details

Defined in Data.Comp.Arbitrary

Methods

arbitraryF' :: Arbitrary v => [(Int, Gen (b, c, d, v))] Source #

arbitraryF :: Arbitrary v => Gen (b, c, d, v) Source #

shrinkF :: Arbitrary v => (b, c, d, v) -> [(b, c, d, v)] Source #

(Arbitrary b, Arbitrary c, Arbitrary d, Arbitrary e) => ArbitraryF ((,,,,) b c d e) Source # 
Instance details

Defined in Data.Comp.Arbitrary

Methods

arbitraryF' :: Arbitrary v => [(Int, Gen (b, c, d, e, v))] Source #

arbitraryF :: Arbitrary v => Gen (b, c, d, e, v) Source #

shrinkF :: Arbitrary v => (b, c, d, e, v) -> [(b, c, d, e, v)] Source #

(Arbitrary b, Arbitrary c, Arbitrary d, Arbitrary e, Arbitrary f) => ArbitraryF ((,,,,,) b c d e f) Source # 
Instance details

Defined in Data.Comp.Arbitrary

Methods

arbitraryF' :: Arbitrary v => [(Int, Gen (b, c, d, e, f, v))] Source #

arbitraryF :: Arbitrary v => Gen (b, c, d, e, f, v) Source #

shrinkF :: Arbitrary v => (b, c, d, e, f, v) -> [(b, c, d, e, f, v)] Source #

(Arbitrary b, Arbitrary c, Arbitrary d, Arbitrary e, Arbitrary f, Arbitrary g) => ArbitraryF ((,,,,,,) b c d e f g) Source # 
Instance details

Defined in Data.Comp.Arbitrary

Methods

arbitraryF' :: Arbitrary v => [(Int, Gen (b, c, d, e, f, g, v))] Source #

arbitraryF :: Arbitrary v => Gen (b, c, d, e, f, g, v) Source #

shrinkF :: Arbitrary v => (b, c, d, e, f, g, v) -> [(b, c, d, e, f, g, v)] Source #

(Arbitrary b, Arbitrary c, Arbitrary d, Arbitrary e, Arbitrary f, Arbitrary g, Arbitrary h) => ArbitraryF ((,,,,,,,) b c d e f g h) Source # 
Instance details

Defined in Data.Comp.Arbitrary

Methods

arbitraryF' :: Arbitrary v => [(Int, Gen (b, c, d, e, f, g, h, v))] Source #

arbitraryF :: Arbitrary v => Gen (b, c, d, e, f, g, h, v) Source #

shrinkF :: Arbitrary v => (b, c, d, e, f, g, h, v) -> [(b, c, d, e, f, g, h, v)] Source #

(Arbitrary b, Arbitrary c, Arbitrary d, Arbitrary e, Arbitrary f, Arbitrary g, Arbitrary h, Arbitrary i) => ArbitraryF ((,,,,,,,,) b c d e f g h i) Source # 
Instance details

Defined in Data.Comp.Arbitrary

Methods

arbitraryF' :: Arbitrary v => [(Int, Gen (b, c, d, e, f, g, h, i, v))] Source #

arbitraryF :: Arbitrary v => Gen (b, c, d, e, f, g, h, i, v) Source #

shrinkF :: Arbitrary v => (b, c, d, e, f, g, h, i, v) -> [(b, c, d, e, f, g, h, i, v)] Source #

(Arbitrary b, Arbitrary c, Arbitrary d, Arbitrary e, Arbitrary f, Arbitrary g, Arbitrary h, Arbitrary i, Arbitrary j) => ArbitraryF ((,,,,,,,,,) b c d e f g h i j) Source # 
Instance details

Defined in Data.Comp.Arbitrary

Methods

arbitraryF' :: Arbitrary v => [(Int, Gen (b, c, d, e, f, g, h, i, j, v))] Source #

arbitraryF :: Arbitrary v => Gen (b, c, d, e, f, g, h, i, j, v) Source #

shrinkF :: Arbitrary v => (b, c, d, e, f, g, h, i, j, v) -> [(b, c, d, e, f, g, h, i, j, v)] Source #

Orphan instances

ArbitraryF Maybe Source # 
Instance details

ArbitraryF [] Source # 
Instance details

Methods

arbitraryF' :: Arbitrary v => [(Int, Gen [v])] Source #

arbitraryF :: Arbitrary v => Gen [v] Source #

shrinkF :: Arbitrary v => [v] -> [[v]] Source #

ArbitraryF f => Arbitrary (Term f) Source #

This lifts instances of ArbitraryF to instances of Arbitrary for the corresponding term type.

Instance details

Methods

arbitrary :: Gen (Term f) #

shrink :: Term f -> [Term f] #

ArbitraryF f => ArbitraryF (Context f) Source #

This lifts instances of ArbitraryF to instances of ArbitraryF for the corresponding context functor.

Instance details

Methods

arbitraryF' :: Arbitrary v => [(Int, Gen (Context f v))] Source #

arbitraryF :: Arbitrary v => Gen (Context f v) Source #

shrinkF :: Arbitrary v => Context f v -> [Context f v] Source #

Arbitrary b => ArbitraryF ((,) b) Source # 
Instance details

Methods

arbitraryF' :: Arbitrary v => [(Int, Gen (b, v))] Source #

arbitraryF :: Arbitrary v => Gen (b, v) Source #

shrinkF :: Arbitrary v => (b, v) -> [(b, v)] Source #

(ArbitraryF f, Arbitrary a) => Arbitrary (Context f a) Source #

This lifts instances of ArbitraryF to instances of Arbitrary for the corresponding context type.

Instance details

Methods

arbitrary :: Gen (Context f a) #

shrink :: Context f a -> [Context f a] #

(Arbitrary b, Arbitrary c) => ArbitraryF ((,,) b c) Source # 
Instance details

Methods

arbitraryF' :: Arbitrary v => [(Int, Gen (b, c, v))] Source #

arbitraryF :: Arbitrary v => Gen (b, c, v) Source #

shrinkF :: Arbitrary v => (b, c, v) -> [(b, c, v)] Source #

(ArbitraryF f, Arbitrary p) => ArbitraryF (f :&: p) Source # 
Instance details

Methods

arbitraryF' :: Arbitrary v => [(Int, Gen ((f :&: p) v))] Source #

arbitraryF :: Arbitrary v => Gen ((f :&: p) v) Source #

shrinkF :: Arbitrary v => (f :&: p) v -> [(f :&: p) v] Source #

(ArbitraryF f, ArbitraryF g) => ArbitraryF (f :+: g) Source #

Instances of ArbitraryF are closed under forming sums.

Instance details

Methods

arbitraryF' :: Arbitrary v => [(Int, Gen ((f :+: g) v))] Source #

arbitraryF :: Arbitrary v => Gen ((f :+: g) v) Source #

shrinkF :: Arbitrary v => (f :+: g) v -> [(f :+: g) v] Source #

(Arbitrary b, Arbitrary c, Arbitrary d) => ArbitraryF ((,,,) b c d) Source # 
Instance details

Methods

arbitraryF' :: Arbitrary v => [(Int, Gen (b, c, d, v))] Source #

arbitraryF :: Arbitrary v => Gen (b, c, d, v) Source #

shrinkF :: Arbitrary v => (b, c, d, v) -> [(b, c, d, v)] Source #

(Arbitrary b, Arbitrary c, Arbitrary d, Arbitrary e) => ArbitraryF ((,,,,) b c d e) Source # 
Instance details

Methods

arbitraryF' :: Arbitrary v => [(Int, Gen (b, c, d, e, v))] Source #

arbitraryF :: Arbitrary v => Gen (b, c, d, e, v) Source #

shrinkF :: Arbitrary v => (b, c, d, e, v) -> [(b, c, d, e, v)] Source #

(Arbitrary b, Arbitrary c, Arbitrary d, Arbitrary e, Arbitrary f) => ArbitraryF ((,,,,,) b c d e f) Source # 
Instance details

Methods

arbitraryF' :: Arbitrary v => [(Int, Gen (b, c, d, e, f, v))] Source #

arbitraryF :: Arbitrary v => Gen (b, c, d, e, f, v) Source #

shrinkF :: Arbitrary v => (b, c, d, e, f, v) -> [(b, c, d, e, f, v)] Source #

(Arbitrary b, Arbitrary c, Arbitrary d, Arbitrary e, Arbitrary f, Arbitrary g) => ArbitraryF ((,,,,,,) b c d e f g) Source # 
Instance details

Methods

arbitraryF' :: Arbitrary v => [(Int, Gen (b, c, d, e, f, g, v))] Source #

arbitraryF :: Arbitrary v => Gen (b, c, d, e, f, g, v) Source #

shrinkF :: Arbitrary v => (b, c, d, e, f, g, v) -> [(b, c, d, e, f, g, v)] Source #

(Arbitrary b, Arbitrary c, Arbitrary d, Arbitrary e, Arbitrary f, Arbitrary g, Arbitrary h) => ArbitraryF ((,,,,,,,) b c d e f g h) Source # 
Instance details

Methods

arbitraryF' :: Arbitrary v => [(Int, Gen (b, c, d, e, f, g, h, v))] Source #

arbitraryF :: Arbitrary v => Gen (b, c, d, e, f, g, h, v) Source #

shrinkF :: Arbitrary v => (b, c, d, e, f, g, h, v) -> [(b, c, d, e, f, g, h, v)] Source #

(Arbitrary b, Arbitrary c, Arbitrary d, Arbitrary e, Arbitrary f, Arbitrary g, Arbitrary h, Arbitrary i) => ArbitraryF ((,,,,,,,,) b c d e f g h i) Source # 
Instance details

Methods

arbitraryF' :: Arbitrary v => [(Int, Gen (b, c, d, e, f, g, h, i, v))] Source #

arbitraryF :: Arbitrary v => Gen (b, c, d, e, f, g, h, i, v) Source #

shrinkF :: Arbitrary v => (b, c, d, e, f, g, h, i, v) -> [(b, c, d, e, f, g, h, i, v)] Source #

(Arbitrary b, Arbitrary c, Arbitrary d, Arbitrary e, Arbitrary f, Arbitrary g, Arbitrary h, Arbitrary i, Arbitrary j) => ArbitraryF ((,,,,,,,,,) b c d e f g h i j) Source # 
Instance details

Methods

arbitraryF' :: Arbitrary v => [(Int, Gen (b, c, d, e, f, g, h, i, j, v))] Source #

arbitraryF :: Arbitrary v => Gen (b, c, d, e, f, g, h, i, j, v) Source #

shrinkF :: Arbitrary v => (b, c, d, e, f, g, h, i, j, v) -> [(b, c, d, e, f, g, h, i, j, v)] Source #