plutus-core-1.71.0.0: Language library for Plutus Core
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusCore.Generators.QuickCheck.GenTm

Synopsis

Documentation

type GenTm = GenT (Reader GenEnv) Source #

Term generators carry around a context to know e.g. what types and terms are in scope.

data GenEnv Source #

Constructors

GenEnv 

Fields

suchThatMap ∷ Monad m ⇒ GenT m a → (a → Maybe b) → GenT m b Source #

Create a generator that runs the given generator and applies the given function to produced values until the result is a Just y, returning the y.

withDebug ∷ GenTm a → GenTm a Source #

Run a generator in debug-mode.

runGenTm ∷ GenTm a → Gen a Source #

Run a `GenTm generator in a top-level empty context where we are allowed to generate datatypes.

runGenTmCustom ∷ Int → (Maybe (Type TyName DefaultUni ()) → GenTm (Type TyName DefaultUni (), Term TyName Name DefaultUni DefaultFun ())) → GenTm a → Gen a Source #

Run a GenTm generator with a plug-in custom generator for terms that is included with the other generators.

deliver ∷ Monad m ⇒ GenT m (Maybe a) → GenT m a Source #

Create a generator that runs the given generator until the result is a Just x, returning the x.

withNoEscape ∷ GenTm a → GenTm a Source #

Don't allow types to escape from a generator.

onAstSize ∷ (Int → Int) → GenTm a → GenTm a Source #

Map a function over the generator size

ifAstSizeZero ∷ GenTm a → GenTm a → GenTm a Source #

Default to the first generator if the size is zero (or negative), use the second generator otherwise.

withAstSize ∷ Int → GenTm a → GenTm a Source #

Locally set the size in a generator

astSizeSplit_ ∷ Int → Int → GenTm a → GenTm b → GenTm (a, b) Source #

Split the size between two generators in the ratio specified by the first two arguments.

astSizeSplit ∷ Int → Int → GenTm a → (a → GenTm b) → GenTm (a, b) Source #

Split the size between two generators in the ratio specified by the first two arguments and use the result of the first generator in the second.

getUniques ∷ GenTm (Set Unique) Source #

Get all uniques we have generated and are used in the current context.

genLikelyFreshName ∷ String → GenTm Name Source #

Generate a likely fresh name. See Note [Warning about generating fresh names].

genLikelyFreshNames ∷ [String] → GenTm [Name] Source #

Generate one likely fresh name per string in the input list. Note that this may not give you a fresh name, if it happens to generate a name that was removed from the terms map in bindTyName (due to referencing a now-shadowed type variable) but is still in the scope.

genLikelyNotFreshName ∷ String → GenTm Name Source #

Generate a name that likely overlaps with existing names on purpose. If there are no existing names, generate a fresh name. This function doesn't distinguish between the type- and term-level scopes, hence it may generate a Name "clashing" with a previously generated TyName and not clashing with any previously generated Name. Which is a good thing, because we want to check that Plutus is able to handle such spurious name clashes. Generating weird stuff is useful for a testing machinery! We don't need any "definitely non-fresh name" anyway, since we get enough non-fresh names already.

genMaybeFreshName ∷ String → GenTm Name Source #

Generate a fresh name most (roughly 75%) of the time and otherwise generate an already bound name. When there are no bound names generate a fresh name.

bindTyName ∷ TyName → Kind () → GenTm a → GenTm a Source #

Bind a type name to a kind and avoid capturing free type variables.

bindTyNames ∷ [(TyName, Kind ())] → GenTm a → GenTm a Source #

Bind type names

registerTyName ∷ TyName → GenTm a → GenTm a Source #

Remember that we have generated a type name locally but don't bind it. Useful for non-recursive definitions where we want to control name overlap.

bindTmName ∷ Name → Type TyName DefaultUni () → GenTm a → GenTm a Source #

Bind a term to a type in a generator.

bindTmNames ∷ [(Name, Type TyName DefaultUni ())] → GenTm a → GenTm a Source #

Bind term names

bindLikelyFreshTmName ∷ String → Type TyName DefaultUni () → (Name → GenTm a) → GenTm a Source #

Create a fresh term name, bind it to a type, and use it in a generator.

bindDat ∷ Datatype TyName Name DefaultUni () → GenTm a → GenTm a Source #

Bind a datatype declaration in a generator.

bindBind ∷ Binding TyName Name DefaultUni DefaultFun () → GenTm a → GenTm a Source #

Bind a binding.

bindBinds ∷ Foldable f ⇒ f (Binding TyName Name DefaultUni DefaultFun ()) → GenTm a → GenTm a Source #

Bind multiple bindings

class (Applicative g, Monad g) ⇒ MonadGen (g ∷ Type → Type) where Source #

Methods

liftGen ∷ Gen a → g a Source #

variant ∷ Integral n ⇒ n → g a → g a Source #

sized ∷ (Int → g a) → g a Source #

resize ∷ Int → g a → g a Source #

choose ∷ Random a ⇒ (a, a) → g a Source #

Instances

Instances details
MonadGen Gen 
Instance details

Defined in Test.QuickCheck.GenT

Methods

liftGen ∷ Gen a → Gen a Source #

variant ∷ Integral n ⇒ n → Gen a → Gen a Source #

sized ∷ (Int → Gen a) → Gen a Source #

resize ∷ Int → Gen a → Gen a Source #

choose ∷ Random a ⇒ (a, a) → Gen a Source #

(Applicative m, Monad m) ⇒ MonadGen (GenT m) 
Instance details

Defined in Test.QuickCheck.GenT

Methods

liftGen ∷ Gen a → GenT m a Source #

variant ∷ Integral n ⇒ n → GenT m a → GenT m a Source #

sized ∷ (Int → GenT m a) → GenT m a Source #

resize ∷ Int → GenT m a → GenT m a Source #

choose ∷ Random a ⇒ (a, a) → GenT m a Source #

newtype GenT (m ∷ Type → Type) a Source #

Constructors

GenT 

Fields

Instances

Instances details
MonadTrans GenT 
Instance details

Defined in Test.QuickCheck.GenT.Private

Methods

lift ∷ Monad m ⇒ m a → GenT m a Source #

MonadReader r m ⇒ MonadReader r (GenT m) Source # 
Instance details

Defined in PlutusCore.Generators.QuickCheck.GenTm

Methods

ask ∷ GenT m r Source #

local ∷ (r → r) → GenT m a → GenT m a Source #

reader ∷ (r → a) → GenT m a Source #

MonadFail m ⇒ MonadFail (GenT m) 
Instance details

Defined in Test.QuickCheck.GenT.Private

Methods

fail ∷ String → GenT m a Source #

MonadIO m ⇒ MonadIO (GenT m) 
Instance details

Defined in Test.QuickCheck.GenT.Private

Methods

liftIO ∷ IO a → GenT m a Source #

(Functor m, Monad m) ⇒ Applicative (GenT m) 
Instance details

Defined in Test.QuickCheck.GenT.Private

Methods

pure ∷ a → GenT m a Source #

(<*>) ∷ GenT m (a → b) → GenT m a → GenT m b Source #

liftA2 ∷ (a → b → c) → GenT m a → GenT m b → GenT m c Source #

(*>) ∷ GenT m a → GenT m b → GenT m b Source #

(<*) ∷ GenT m a → GenT m b → GenT m a Source #

Functor m ⇒ Functor (GenT m) 
Instance details

Defined in Test.QuickCheck.GenT.Private

Methods

fmap ∷ (a → b) → GenT m a → GenT m b Source #

(<$) ∷ a → GenT m b → GenT m a Source #

Monad m ⇒ Monad (GenT m) 
Instance details

Defined in Test.QuickCheck.GenT.Private

Methods

(>>=) ∷ GenT m a → (a → GenT m b) → GenT m b Source #

(>>) ∷ GenT m a → GenT m b → GenT m b Source #

return ∷ a → GenT m a Source #

(Applicative m, Monad m) ⇒ MonadGen (GenT m) 
Instance details

Defined in Test.QuickCheck.GenT

Methods

liftGen ∷ Gen a → GenT m a Source #

variant ∷ Integral n ⇒ n → GenT m a → GenT m a Source #

sized ∷ (Int → GenT m a) → GenT m a Source #

resize ∷ Int → GenT m a → GenT m a Source #

choose ∷ Random a ⇒ (a, a) → GenT m a Source #

runGenT ∷ GenT m a → Gen (m a) Source #

frequency ∷ MonadGen m ⇒ [(Int, m a)] → m a Source #

Chooses one of the given generators, with a weighted random distribution. The input list must be non-empty.

suchThat ∷ MonadGen m ⇒ m a → (a → Bool) → m a Source #

Generates a value that satisfies a predicate.

suchThatMaybe ∷ MonadGen m ⇒ m a → (a → Bool) → m (Maybe a) Source #

Tries to generate a value that satisfies a predicate.

listOf ∷ MonadGen m ⇒ m a → m [a] Source #

Generates a list of random length. The maximum length depends on the size parameter.

listOf1 ∷ MonadGen m ⇒ m a → m [a] Source #

Generates a non-empty list of random length. The maximum length depends on the size parameter.

vectorOf ∷ MonadGen m ⇒ Int → m a → m [a] Source #

Generates a list of the given length.

oneof ∷ MonadGen m ⇒ [m a] → m a Source #

Randomly uses one of the given generators. The input list must be non-empty.

elements ∷ MonadGen m ⇒ [a] → m a Source #

Generates one of the given values. The input list must be non-empty.

growingElements ∷ MonadGen m ⇒ [a] → m a Source #

Takes a list of elements of increasing size, and chooses among an initial segment of the list. The size of this initial segment increases with the size parameter. The input list must be non-empty.

oneofMay ∷ MonadGen m ⇒ [m a] → m (Maybe a) Source #

Randomly uses one of the given generators.

elementsMay ∷ MonadGen m ⇒ [a] → m (Maybe a) Source #

Generates one of the given values.

growingElementsMay ∷ MonadGen m ⇒ [a] → m (Maybe a) Source #

Takes a list of elements of increasing size, and chooses among an initial segment of the list. The size of this initial segment increases with the size parameter.

class Arbitrary a where #

Minimal complete definition

arbitrary

Methods

arbitrary ∷ Gen a #

shrink ∷ a → [a] #

Instances

Instances details
Arbitrary ASCIIString 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

arbitrary ∷ Gen ASCIIString #

shrink ∷ ASCIIString → [ASCIIString] #

Arbitrary PrintableString 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

arbitrary ∷ Gen PrintableString #

shrink ∷ PrintableString → [PrintableString] #

Arbitrary UnicodeString 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

arbitrary ∷ Gen UnicodeString #

shrink ∷ UnicodeString → [UnicodeString] #

Arbitrary QCGen 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen QCGen #

shrink ∷ QCGen → [QCGen] #

Arbitrary Key

Since: aeson-2.0.3.0

Instance details

Defined in Data.Aeson.Key

Methods

arbitrary ∷ Gen Key #

shrink ∷ Key → [Key] #

Arbitrary Value

Since: aeson-2.0.3.0

Instance details

Defined in Data.Aeson.Types.Internal

Methods

arbitrary ∷ Gen Value #

shrink ∷ Value → [Value] #

Arbitrary ByteArray 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary All 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen All #

shrink ∷ All → [All] #

Arbitrary Any 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen Any #

shrink ∷ Any → [Any] #

Arbitrary Version 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary CChar 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen CChar #

shrink ∷ CChar → [CChar] #

Arbitrary CClock 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen CClock #

shrink ∷ CClock → [CClock] #

Arbitrary CDouble 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary CFloat 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen CFloat #

shrink ∷ CFloat → [CFloat] #

Arbitrary CInt 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen CInt #

shrink ∷ CInt → [CInt] #

Arbitrary CIntMax 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary CIntPtr 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary CLLong 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen CLLong #

shrink ∷ CLLong → [CLLong] #

Arbitrary CLong 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen CLong #

shrink ∷ CLong → [CLong] #

Arbitrary CPtrdiff 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary CSChar 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen CSChar #

shrink ∷ CSChar → [CSChar] #

Arbitrary CSUSeconds 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary CShort 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen CShort #

shrink ∷ CShort → [CShort] #

Arbitrary CSigAtomic 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary CSize 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen CSize #

shrink ∷ CSize → [CSize] #

Arbitrary CTime 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen CTime #

shrink ∷ CTime → [CTime] #

Arbitrary CUChar 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen CUChar #

shrink ∷ CUChar → [CUChar] #

Arbitrary CUInt 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen CUInt #

shrink ∷ CUInt → [CUInt] #

Arbitrary CUIntMax 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary CUIntPtr 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary CULLong 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary CULong 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen CULong #

shrink ∷ CULong → [CULong] #

Arbitrary CUSeconds 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary CUShort 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary CWchar 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen CWchar #

shrink ∷ CWchar → [CWchar] #

Arbitrary SeekMode 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary TextEncoding 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary ExitCode 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary BufferMode 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary Newline 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary NewlineMode 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary IOMode 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen IOMode #

shrink ∷ IOMode → [IOMode] #

Arbitrary Int16 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen Int16 #

shrink ∷ Int16 → [Int16] #

Arbitrary Int32 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen Int32 #

shrink ∷ Int32 → [Int32] #

Arbitrary Int64 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen Int64 #

shrink ∷ Int64 → [Int64] #

Arbitrary Int8 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen Int8 #

shrink ∷ Int8 → [Int8] #

Arbitrary GeneralCategory 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary Word16 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen Word16 #

shrink ∷ Word16 → [Word16] #

Arbitrary Word32 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen Word32 #

shrink ∷ Word32 → [Word32] #

Arbitrary Word64 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen Word64 #

shrink ∷ Word64 → [Word64] #

Arbitrary Word8 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen Word8 #

shrink ∷ Word8 → [Word8] #

Arbitrary FieldFormat 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary FormatAdjustment 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary FormatParse 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary FormatSign 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary IntSet 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen IntSet #

shrink ∷ IntSet → [IntSet] #

Arbitrary Ordering 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary Data Source # 
Instance details

Defined in PlutusCore.Generators.QuickCheck.Builtin

Methods

arbitrary ∷ Gen Data #

shrink ∷ Data → [Data] #

Arbitrary K Source # 
Instance details

Defined in PlutusCore.Generators.QuickCheck.Builtin

Methods

arbitrary ∷ Gen K #

shrink ∷ K → [K] #

Arbitrary Quantity Source # 
Instance details

Defined in PlutusCore.Generators.QuickCheck.Builtin

Arbitrary Value Source # 
Instance details

Defined in PlutusCore.Generators.QuickCheck.Builtin

Methods

arbitrary ∷ Gen Value #

shrink ∷ Value → [Value] #

Arbitrary Integer 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary Natural 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary () 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen () #

shrink ∷ () → [()] #

Arbitrary Bool 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen Bool #

shrink ∷ Bool → [Bool] #

Arbitrary Char 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen Char #

shrink ∷ Char → [Char] #

Arbitrary Double 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen Double #

shrink ∷ Double → [Double] #

Arbitrary Float 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen Float #

shrink ∷ Float → [Float] #

Arbitrary Int 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen Int #

shrink ∷ Int → [Int] #

Arbitrary Word 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen Word #

shrink ∷ Word → [Word] #

Arbitrary a ⇒ Arbitrary (Blind a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

arbitrary ∷ Gen (Blind a) #

shrink ∷ Blind a → [Blind a] #

Arbitrary a ⇒ Arbitrary (Fixed a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

arbitrary ∷ Gen (Fixed a) #

shrink ∷ Fixed a → [Fixed a] #

Arbitrary a ⇒ Arbitrary (InfiniteList a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

arbitrary ∷ Gen (InfiniteList a) #

shrink ∷ InfiniteList a → [InfiniteList a] #

Arbitrary a ⇒ Arbitrary (InfiniteListInternalData a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

arbitrary ∷ Gen (InfiniteListInternalData a) #

shrink ∷ InfiniteListInternalData a → [InfiniteListInternalData a] #

(Integral a, Bounded a) ⇒ Arbitrary (Large a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

arbitrary ∷ Gen (Large a) #

shrink ∷ Large a → [Large a] #

(Num a, Ord a, Arbitrary a) ⇒ Arbitrary (Negative a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

arbitrary ∷ Gen (Negative a) #

shrink ∷ Negative a → [Negative a] #

Arbitrary a ⇒ Arbitrary (NoShrink a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

arbitrary ∷ Gen (NoShrink a) #

shrink ∷ NoShrink a → [NoShrink a] #

Arbitrary a ⇒ Arbitrary (NonEmptyList a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

arbitrary ∷ Gen (NonEmptyList a) #

shrink ∷ NonEmptyList a → [NonEmptyList a] #

(Num a, Ord a, Arbitrary a) ⇒ Arbitrary (NonNegative a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

arbitrary ∷ Gen (NonNegative a) #

shrink ∷ NonNegative a → [NonNegative a] #

(Num a, Ord a, Arbitrary a) ⇒ Arbitrary (NonPositive a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

arbitrary ∷ Gen (NonPositive a) #

shrink ∷ NonPositive a → [NonPositive a] #

(Num a, Eq a, Arbitrary a) ⇒ Arbitrary (NonZero a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

arbitrary ∷ Gen (NonZero a) #

shrink ∷ NonZero a → [NonZero a] #

(Ord a, Arbitrary a) ⇒ Arbitrary (OrderedList a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

arbitrary ∷ Gen (OrderedList a) #

shrink ∷ OrderedList a → [OrderedList a] #

(Num a, Ord a, Arbitrary a) ⇒ Arbitrary (Positive a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

arbitrary ∷ Gen (Positive a) #

shrink ∷ Positive a → [Positive a] #

Arbitrary a ⇒ Arbitrary (Shrink2 a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

arbitrary ∷ Gen (Shrink2 a) #

shrink ∷ Shrink2 a → [Shrink2 a] #

Integral a ⇒ Arbitrary (Small a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

arbitrary ∷ Gen (Small a) #

shrink ∷ Small a → [Small a] #

Arbitrary a ⇒ Arbitrary (Smart a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

arbitrary ∷ Gen (Smart a) #

shrink ∷ Smart a → [Smart a] #

(Arbitrary a, Ord a) ⇒ Arbitrary (SortedList a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

arbitrary ∷ Gen (SortedList a) #

shrink ∷ SortedList a → [SortedList a] #

Arbitrary a ⇒ Arbitrary (Stream a) 
Instance details

Defined in Data.Stream

Methods

arbitrary ∷ Gen (Stream a) #

shrink ∷ Stream a → [Stream a] #

Arbitrary v ⇒ Arbitrary (KeyMap v)

Since: aeson-2.0.3.0

Instance details

Defined in Data.Aeson.KeyMap

Methods

arbitrary ∷ Gen (KeyMap v) #

shrink ∷ KeyMap v → [KeyMap v] #

Arbitrary a ⇒ Arbitrary (ZipList a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (ZipList a) #

shrink ∷ ZipList a → [ZipList a] #

Arbitrary a ⇒ Arbitrary (And a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (And a) #

shrink ∷ And a → [And a] #

Arbitrary a ⇒ Arbitrary (Iff a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (Iff a) #

shrink ∷ Iff a → [Iff a] #

Arbitrary a ⇒ Arbitrary (Ior a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (Ior a) #

shrink ∷ Ior a → [Ior a] #

Arbitrary a ⇒ Arbitrary (Xor a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (Xor a) #

shrink ∷ Xor a → [Xor a] #

Arbitrary a ⇒ Arbitrary (Complex a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (Complex a) #

shrink ∷ Complex a → [Complex a] #

CoArbitrary a ⇒ Arbitrary (Comparison a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (Comparison a) #

shrink ∷ Comparison a → [Comparison a] #

CoArbitrary a ⇒ Arbitrary (Equivalence a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

CoArbitrary a ⇒ Arbitrary (Predicate a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (Predicate a) #

shrink ∷ Predicate a → [Predicate a] #

Arbitrary a ⇒ Arbitrary (Identity a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (Identity a) #

shrink ∷ Identity a → [Identity a] #

Arbitrary a ⇒ Arbitrary (First a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (First a) #

shrink ∷ First a → [First a] #

Arbitrary a ⇒ Arbitrary (Last a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (Last a) #

shrink ∷ Last a → [Last a] #

Arbitrary a ⇒ Arbitrary (Down a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (Down a) #

shrink ∷ Down a → [Down a] #

Arbitrary a ⇒ Arbitrary (First a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (First a) #

shrink ∷ First a → [First a] #

Arbitrary a ⇒ Arbitrary (Last a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (Last a) #

shrink ∷ Last a → [Last a] #

Arbitrary a ⇒ Arbitrary (Max a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (Max a) #

shrink ∷ Max a → [Max a] #

Arbitrary a ⇒ Arbitrary (Min a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (Min a) #

shrink ∷ Min a → [Min a] #

Arbitrary a ⇒ Arbitrary (WrappedMonoid a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary a ⇒ Arbitrary (Dual a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (Dual a) #

shrink ∷ Dual a → [Dual a] #

(Arbitrary a, CoArbitrary a) ⇒ Arbitrary (Endo a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (Endo a) #

shrink ∷ Endo a → [Endo a] #

Arbitrary a ⇒ Arbitrary (Product a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (Product a) #

shrink ∷ Product a → [Product a] #

Arbitrary a ⇒ Arbitrary (Sum a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (Sum a) #

shrink ∷ Sum a → [Sum a] #

Arbitrary a ⇒ Arbitrary (NonEmpty a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (NonEmpty a) #

shrink ∷ NonEmpty a → [NonEmpty a] #

Integral a ⇒ Arbitrary (Ratio a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (Ratio a) #

shrink ∷ Ratio a → [Ratio a] #

Arbitrary a ⇒ Arbitrary (ArgDescr a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (ArgDescr a) #

shrink ∷ ArgDescr a → [ArgDescr a] #

Arbitrary a ⇒ Arbitrary (ArgOrder a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (ArgOrder a) #

shrink ∷ ArgOrder a → [ArgOrder a] #

Arbitrary a ⇒ Arbitrary (OptDescr a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (OptDescr a) #

shrink ∷ OptDescr a → [OptDescr a] #

Arbitrary a ⇒ Arbitrary (IntMap a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (IntMap a) #

shrink ∷ IntMap a → [IntMap a] #

Arbitrary a ⇒ Arbitrary (Seq a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (Seq a) #

shrink ∷ Seq a → [Seq a] #

(Ord a, Arbitrary a) ⇒ Arbitrary (Set a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (Set a) #

shrink ∷ Set a → [Set a] #

Arbitrary a ⇒ Arbitrary (Tree a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (Tree a) #

shrink ∷ Tree a → [Tree a] #

Arbitrary (BuiltinSemanticsVariant DefaultFun) Source # 
Instance details

Defined in PlutusIR.Pass.Test

Arbitrary (Kind ()) Source # 
Instance details

Defined in PlutusCore.Generators.QuickCheck.GenerateKinds

Methods

arbitrary ∷ Gen (Kind ()) #

shrink ∷ Kind () → [Kind ()] #

Arbitrary (SomeTypeIn DefaultUni) Source # 
Instance details

Defined in PlutusCore.Generators.QuickCheck.Builtin

ArbitraryBuiltin a ⇒ Arbitrary (AsArbitraryBuiltin a) Source # 
Instance details

Defined in PlutusCore.Generators.QuickCheck.Builtin

KnownKind k ⇒ Arbitrary (MaybeSomeTypeOf k) Source # 
Instance details

Defined in PlutusCore.Generators.QuickCheck.Builtin

Arbitrary (NoArbitrary a) Source #

arbitrary throws, shrink neither throws nor shrinks.

Instance details

Defined in PlutusCore.Generators.QuickCheck.Builtin

Arbitrary a ⇒ Arbitrary (Maybe a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (Maybe a) #

shrink ∷ Maybe a → [Maybe a] #

Arbitrary a ⇒ Arbitrary (a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (a) #

shrink ∷ (a) → [(a)] #

Arbitrary a ⇒ Arbitrary [a] 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen [a] #

shrink ∷ [a] → [[a]] #

(Function a, CoArbitrary a, Arbitrary b) ⇒ Arbitrary (a :-> b) 
Instance details

Defined in Test.QuickCheck.Function

Methods

arbitrary ∷ Gen (a :-> b) #

shrink ∷ (a :-> b) → [a :-> b] #

(Function a, CoArbitrary a, Arbitrary b) ⇒ Arbitrary (Fun a b) 
Instance details

Defined in Test.QuickCheck.Function

Methods

arbitrary ∷ Gen (Fun a b) #

shrink ∷ Fun a b → [Fun a b] #

(Arbitrary a, ShrinkState s a) ⇒ Arbitrary (Shrinking s a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

arbitrary ∷ Gen (Shrinking s a) #

shrink ∷ Shrinking s a → [Shrinking s a] #

Arbitrary (m a) ⇒ Arbitrary (WrappedMonad m a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (WrappedMonad m a) #

shrink ∷ WrappedMonad m a → [WrappedMonad m a] #

(Arbitrary a, Arbitrary b) ⇒ Arbitrary (Either a b) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (Either a b) #

shrink ∷ Either a b → [Either a b] #

HasResolution a ⇒ Arbitrary (Fixed a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (Fixed a) #

shrink ∷ Fixed a → [Fixed a] #

(Arbitrary a, CoArbitrary b) ⇒ Arbitrary (Op a b) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (Op a b) #

shrink ∷ Op a b → [Op a b] #

(Arbitrary a, Arbitrary b) ⇒ Arbitrary (Arg a b) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (Arg a b) #

shrink ∷ Arg a b → [Arg a b] #

(Ord k, Arbitrary k, Arbitrary v) ⇒ Arbitrary (Map k v) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (Map k v) #

shrink ∷ Map k v → [Map k v] #

Arbitrary (Some (ValueOf DefaultUni)) Source # 
Instance details

Defined in PlutusCore.Generators.QuickCheck.Builtin

(Arbitrary a, Arbitrary b) ⇒ Arbitrary (a, b) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (a, b) #

shrink ∷ (a, b) → [(a, b)] #

(CoArbitrary a, Arbitrary b) ⇒ Arbitrary (a → b) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (a → b) #

shrink ∷ (a → b) → [a → b] #

Arbitrary (a b c) ⇒ Arbitrary (WrappedArrow a b c) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (WrappedArrow a b c) #

shrink ∷ WrappedArrow a b c → [WrappedArrow a b c] #

Arbitrary a ⇒ Arbitrary (Const a b) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (Const a b) #

shrink ∷ Const a b → [Const a b] #

Arbitrary (f a) ⇒ Arbitrary (Alt f a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (Alt f a) #

shrink ∷ Alt f a → [Alt f a] #

Arbitrary a ⇒ Arbitrary (Constant a b) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (Constant a b) #

shrink ∷ Constant a b → [Constant a b] #

(Arbitrary a, Arbitrary b, Arbitrary c) ⇒ Arbitrary (a, b, c) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (a, b, c) #

shrink ∷ (a, b, c) → [(a, b, c)] #

(Arbitrary1 f, Arbitrary1 g, Arbitrary a) ⇒ Arbitrary (Product f g a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (Product f g a) #

shrink ∷ Product f g a → [Product f g a] #

(Arbitrary a, Arbitrary b, Arbitrary c, Arbitrary d) ⇒ Arbitrary (a, b, c, d) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (a, b, c, d) #

shrink ∷ (a, b, c, d) → [(a, b, c, d)] #

(Arbitrary1 f, Arbitrary1 g, Arbitrary a) ⇒ Arbitrary (Compose f g a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (Compose f g a) #

shrink ∷ Compose f g a → [Compose f g a] #

(Arbitrary a, Arbitrary b, Arbitrary c, Arbitrary d, Arbitrary e) ⇒ Arbitrary (a, b, c, d, e) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (a, b, c, d, e) #

shrink ∷ (a, b, c, d, e) → [(a, b, c, d, e)] #

(Arbitrary a, Arbitrary b, Arbitrary c, Arbitrary d, Arbitrary e, Arbitrary f) ⇒ Arbitrary (a, b, c, d, e, f) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (a, b, c, d, e, f) #

shrink ∷ (a, b, c, d, e, f) → [(a, b, c, d, e, f)] #

(Arbitrary a, Arbitrary b, Arbitrary c, Arbitrary d, Arbitrary e, Arbitrary f, Arbitrary g) ⇒ Arbitrary (a, b, c, d, e, f, g) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (a, b, c, d, e, f, g) #

shrink ∷ (a, b, c, d, e, f, g) → [(a, b, c, d, e, f, g)] #

(Arbitrary a, Arbitrary b, Arbitrary c, Arbitrary d, Arbitrary e, Arbitrary f, Arbitrary g, Arbitrary h) ⇒ Arbitrary (a, b, c, d, e, f, g, h) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (a, b, c, d, e, f, g, h) #

shrink ∷ (a, b, c, d, e, f, g, h) → [(a, b, c, d, e, f, g, h)] #

(Arbitrary a, Arbitrary b, Arbitrary c, Arbitrary d, Arbitrary e, Arbitrary f, Arbitrary g, Arbitrary h, Arbitrary i) ⇒ Arbitrary (a, b, c, d, e, f, g, h, i) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (a, b, c, d, e, f, g, h, i) #

shrink ∷ (a, b, c, d, e, f, g, h, i) → [(a, b, c, d, e, f, g, h, i)] #

(Arbitrary a, Arbitrary b, Arbitrary c, Arbitrary d, Arbitrary e, Arbitrary f, Arbitrary g, Arbitrary h, Arbitrary i, Arbitrary j) ⇒ Arbitrary (a, b, c, d, e, f, g, h, i, j) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary ∷ Gen (a, b, c, d, e, f, g, h, i, j) #

shrink ∷ (a, b, c, d, e, f, g, h, i, j) → [(a, b, c, d, e, f, g, h, i, j)] #

data Gen a #

Instances

Instances details
MonadFix Gen 
Instance details

Defined in Test.QuickCheck.Gen

Methods

mfix ∷ (a → Gen a) → Gen a Source #

Applicative Gen 
Instance details

Defined in Test.QuickCheck.Gen

Methods

pure ∷ a → Gen a Source #

(<*>) ∷ Gen (a → b) → Gen a → Gen b Source #

liftA2 ∷ (a → b → c) → Gen a → Gen b → Gen c Source #

(*>) ∷ Gen a → Gen b → Gen b Source #

(<*) ∷ Gen a → Gen b → Gen a Source #

Functor Gen 
Instance details

Defined in Test.QuickCheck.Gen

Methods

fmap ∷ (a → b) → Gen a → Gen b Source #

(<$) ∷ a → Gen b → Gen a Source #

Monad Gen 
Instance details

Defined in Test.QuickCheck.Gen

Methods

(>>=) ∷ Gen a → (a → Gen b) → Gen b Source #

(>>) ∷ Gen a → Gen b → Gen b Source #

return ∷ a → Gen a Source #

MonadGen Gen 
Instance details

Defined in Test.QuickCheck.GenT

Methods

liftGen ∷ Gen a → Gen a Source #

variant ∷ Integral n ⇒ n → Gen a → Gen a Source #

sized ∷ (Int → Gen a) → Gen a Source #

resize ∷ Int → Gen a → Gen a Source #

choose ∷ Random a ⇒ (a, a) → Gen a Source #

Testable prop ⇒ Testable (Gen prop) 
Instance details

Defined in Test.QuickCheck.Property

Methods

property ∷ Gen prop → Property

propertyForAllShrinkShow ∷ Gen a → (a → [a]) → (a → [String]) → (a → Gen prop) → Property

Orphan instances

MonadReader r m ⇒ MonadReader r (GenT m) Source # 
Instance details

Methods

ask ∷ GenT m r Source #

local ∷ (r → r) → GenT m a → GenT m a Source #

reader ∷ (r → a) → GenT m a Source #