compdata-0.8.0.1: Compositional Data Types

Copyright(c) 2011 Patrick Bahr
LicenseBSD3
MaintainerPatrick Bahr <paba@diku.dk>
Stabilityexperimental
Portabilitynon-portable (GHC Extensions)
Safe HaskellNone
LanguageHaskell98

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

ArbitraryF [] 
ArbitraryF Maybe 
Arbitrary b0 => ArbitraryF ((,) b) 
ArbitraryF f => ArbitraryF (Context f)

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

(Arbitrary b0, Arbitrary c0) => ArbitraryF ((,,) b c) 
(ArbitraryF f, Arbitrary p) => ArbitraryF ((:&:) f p) 
(ArbitraryF f, ArbitraryF g) => ArbitraryF ((:+:) f g)

Instances of ArbitraryF are closed under forming sums.

(Arbitrary b0, Arbitrary c0, Arbitrary d0) => ArbitraryF ((,,,) b c d) 
(Arbitrary b0, Arbitrary c0, Arbitrary d0, Arbitrary e0) => ArbitraryF ((,,,,) b c d e) 
(Arbitrary b0, Arbitrary c0, Arbitrary d0, Arbitrary e0, Arbitrary f0) => ArbitraryF ((,,,,,) b c d e f) 
(Arbitrary b0, Arbitrary c0, Arbitrary d0, Arbitrary e0, Arbitrary f0, Arbitrary g0) => ArbitraryF ((,,,,,,) b c d e f g) 
(Arbitrary b0, Arbitrary c0, Arbitrary d0, Arbitrary e0, Arbitrary f0, Arbitrary g0, Arbitrary h0) => ArbitraryF ((,,,,,,,) b c d e f g h) 
(Arbitrary b0, Arbitrary c0, Arbitrary d0, Arbitrary e0, Arbitrary f0, Arbitrary g0, Arbitrary h0, Arbitrary i0) => ArbitraryF ((,,,,,,,,) b c d e f g h i) 
(Arbitrary b0, Arbitrary c0, Arbitrary d0, Arbitrary e0, Arbitrary f0, Arbitrary g0, Arbitrary h0, Arbitrary i0, Arbitrary j0) => ArbitraryF ((,,,,,,,,,) b c d e f g h i j)