plutus-core-1.36.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

suchThatMapMonad 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.

withDebugGenTm a → GenTm a Source #

Run a generator in debug-mode.

runGenTmGenTm a → Gen a Source #

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

runGenTmCustomInt → (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.

deliverMonad 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.

withNoEscapeGenTm a → GenTm a Source #

Don't allow types to escape from a generator.

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

Map a function over the generator size

ifAstSizeZeroGenTm a → GenTm a → GenTm a Source #

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

withAstSizeIntGenTm a → GenTm a Source #

Locally set the size in a generator

astSizeSplit_IntIntGenTm a → GenTm b → GenTm (a, b) Source #

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

astSizeSplitIntIntGenTm 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.

getUniquesGenTm (Set Unique) Source #

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

genLikelyFreshNameStringGenTm 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.

genLikelyNotFreshNameStringGenTm 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.

genMaybeFreshNameStringGenTm 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.

bindTyNameTyNameKind () → 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

registerTyNameTyNameGenTm 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.

bindTmNameNameType 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

bindLikelyFreshTmNameStringType TyName DefaultUni () → (NameGenTm a) → GenTm a Source #

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

bindDatDatatype TyName Name DefaultUni () → GenTm a → GenTm a Source #

Bind a datatype declaration in a generator.

bindBindBinding TyName Name DefaultUni DefaultFun () → GenTm a → GenTm a Source #

Bind a binding.

bindBindsFoldable f ⇒ f (Binding TyName Name DefaultUni DefaultFun ()) → GenTm a → GenTm a Source #

Bind multiple bindings

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

Methods

liftGenGen a → g a Source #

variantIntegral n ⇒ n → g a → g a Source #

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

resizeInt → g a → g a Source #

chooseRandom a ⇒ (a, a) → g a Source #

Instances

Instances details
MonadGen Gen 
Instance details

Defined in Test.QuickCheck.GenT

Methods

liftGenGen a → Gen a Source #

variantIntegral n ⇒ n → Gen a → Gen a Source #

sized ∷ (IntGen a) → Gen a Source #

resizeIntGen a → Gen a Source #

chooseRandom a ⇒ (a, a) → Gen a Source #

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

Defined in Test.QuickCheck.GenT

Methods

liftGenGen a → GenT m a Source #

variantIntegral n ⇒ n → GenT m a → GenT m a Source #

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

resizeIntGenT m a → GenT m a Source #

chooseRandom a ⇒ (a, a) → GenT m a Source #

newtype GenT (m ∷ TypeType) a Source #

Constructors

GenT 

Fields

Instances

Instances details
MonadTrans GenT 
Instance details

Defined in Test.QuickCheck.GenT.Private

Methods

liftMonad m ⇒ m a → GenT m a Source #

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

Defined in PlutusCore.Generators.QuickCheck.GenTm

Methods

askGenT 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

failStringGenT m a Source #

MonadIO m ⇒ MonadIO (GenT m) 
Instance details

Defined in Test.QuickCheck.GenT.Private

Methods

liftIOIO 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

liftGenGen a → GenT m a Source #

variantIntegral n ⇒ n → GenT m a → GenT m a Source #

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

resizeIntGenT m a → GenT m a Source #

chooseRandom a ⇒ (a, a) → GenT m a Source #

runGenTGenT m a → Gen (m a) Source #

frequencyMonadGen 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.

suchThatMonadGen m ⇒ m a → (a → Bool) → m a Source #

Generates a value that satisfies a predicate.

suchThatMaybeMonadGen m ⇒ m a → (a → Bool) → m (Maybe a) Source #

Tries to generate a value that satisfies a predicate.

listOfMonadGen m ⇒ m a → m [a] Source #

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

listOf1MonadGen m ⇒ m a → m [a] Source #

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

vectorOfMonadGen m ⇒ Int → m a → m [a] Source #

Generates a list of the given length.

oneofMonadGen m ⇒ [m a] → m a Source #

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

elementsMonadGen m ⇒ [a] → m a Source #

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

growingElementsMonadGen 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.

oneofMayMonadGen m ⇒ [m a] → m (Maybe a) Source #

Randomly uses one of the given generators.

elementsMayMonadGen m ⇒ [a] → m (Maybe a) Source #

Generates one of the given values.

growingElementsMayMonadGen 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

arbitraryGen a #

shrink ∷ a → [a] #

Instances

Instances details
Arbitrary ASCIIString 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

arbitraryGen ASCIIString #

shrink ∷ ASCIIString → [ASCIIString] #

Arbitrary PrintableString 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

arbitraryGen PrintableString #

shrink ∷ PrintableString → [PrintableString] #

Arbitrary UnicodeString 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

arbitraryGen UnicodeString #

shrink ∷ UnicodeString → [UnicodeString] #

Arbitrary QCGen 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen QCGen #

shrink ∷ QCGen → [QCGen] #

Arbitrary Key 
Instance details

Defined in Data.Aeson.Key

Methods

arbitraryGen Key #

shrink ∷ Key → [Key] #

Arbitrary Value 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

arbitraryGen Value #

shrink ∷ Value → [Value] #

Arbitrary All 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen All #

shrinkAll → [All] #

Arbitrary Any 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen Any #

shrinkAny → [Any] #

Arbitrary Version 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary CChar 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen CChar #

shrinkCChar → [CChar] #

Arbitrary CClock 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen CClock #

shrinkCClock → [CClock] #

Arbitrary CDouble 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary CFloat 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen CFloat #

shrinkCFloat → [CFloat] #

Arbitrary CInt 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen CInt #

shrinkCInt → [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

arbitraryGen CLLong #

shrinkCLLong → [CLLong] #

Arbitrary CLong 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen CLong #

shrinkCLong → [CLong] #

Arbitrary CPtrdiff 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary CSChar 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen CSChar #

shrinkCSChar → [CSChar] #

Arbitrary CSUSeconds 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary CShort 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen CShort #

shrinkCShort → [CShort] #

Arbitrary CSigAtomic 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary CSize 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen CSize #

shrinkCSize → [CSize] #

Arbitrary CTime 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen CTime #

shrinkCTime → [CTime] #

Arbitrary CUChar 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen CUChar #

shrinkCUChar → [CUChar] #

Arbitrary CUInt 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen CUInt #

shrinkCUInt → [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

arbitraryGen CULong #

shrinkCULong → [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

arbitraryGen CWchar #

shrinkCWchar → [CWchar] #

Arbitrary ExitCode 
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 Int16 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen Int16 #

shrinkInt16 → [Int16] #

Arbitrary Int32 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen Int32 #

shrinkInt32 → [Int32] #

Arbitrary Int64 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen Int64 #

shrinkInt64 → [Int64] #

Arbitrary Int8 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen Int8 #

shrinkInt8 → [Int8] #

Arbitrary Word16 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen Word16 #

shrinkWord16 → [Word16] #

Arbitrary Word32 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen Word32 #

shrinkWord32 → [Word32] #

Arbitrary Word64 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen Word64 #

shrinkWord64 → [Word64] #

Arbitrary Word8 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen Word8 #

shrinkWord8 → [Word8] #

Arbitrary IntSet 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen IntSet #

shrinkIntSet → [IntSet] #

Arbitrary Ordering 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary Data Source # 
Instance details

Defined in PlutusCore.Generators.QuickCheck.Builtin

Methods

arbitraryGen Data #

shrinkData → [Data] #

Arbitrary Integer 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary () 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen () #

shrink ∷ () → [()] #

Arbitrary Bool 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen Bool #

shrinkBool → [Bool] #

Arbitrary Char 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen Char #

shrinkChar → [Char] #

Arbitrary Double 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen Double #

shrinkDouble → [Double] #

Arbitrary Float 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen Float #

shrinkFloat → [Float] #

Arbitrary Int 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen Int #

shrinkInt → [Int] #

Arbitrary Word 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen Word #

shrinkWord → [Word] #

Arbitrary a ⇒ Arbitrary (Blind a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

arbitraryGen (Blind a) #

shrink ∷ Blind a → [Blind a] #

Arbitrary a ⇒ Arbitrary (Fixed a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

arbitraryGen (Fixed a) #

shrink ∷ Fixed a → [Fixed a] #

Arbitrary a ⇒ Arbitrary (InfiniteList a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

arbitraryGen (InfiniteList a) #

shrink ∷ InfiniteList a → [InfiniteList a] #

Arbitrary a ⇒ Arbitrary (InfiniteListInternalData a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

arbitraryGen (InfiniteListInternalData a) #

shrink ∷ InfiniteListInternalData a → [InfiniteListInternalData a] #

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

Defined in Test.QuickCheck.Modifiers

Methods

arbitraryGen (Large a) #

shrink ∷ Large a → [Large a] #

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

Defined in Test.QuickCheck.Modifiers

Methods

arbitraryGen (Negative a) #

shrink ∷ Negative a → [Negative a] #

Arbitrary a ⇒ Arbitrary (NonEmptyList a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

arbitraryGen (NonEmptyList a) #

shrink ∷ NonEmptyList a → [NonEmptyList a] #

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

Defined in Test.QuickCheck.Modifiers

Methods

arbitraryGen (NonNegative a) #

shrink ∷ NonNegative a → [NonNegative a] #

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

Defined in Test.QuickCheck.Modifiers

Methods

arbitraryGen (NonPositive a) #

shrink ∷ NonPositive a → [NonPositive a] #

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

Defined in Test.QuickCheck.Modifiers

Methods

arbitraryGen (NonZero a) #

shrink ∷ NonZero a → [NonZero a] #

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

Defined in Test.QuickCheck.Modifiers

Methods

arbitraryGen (OrderedList a) #

shrink ∷ OrderedList a → [OrderedList a] #

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

Defined in Test.QuickCheck.Modifiers

Methods

arbitraryGen (Positive a) #

shrink ∷ Positive a → [Positive a] #

Arbitrary a ⇒ Arbitrary (Shrink2 a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

arbitraryGen (Shrink2 a) #

shrink ∷ Shrink2 a → [Shrink2 a] #

Integral a ⇒ Arbitrary (Small a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

arbitraryGen (Small a) #

shrink ∷ Small a → [Small a] #

Arbitrary a ⇒ Arbitrary (Smart a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

arbitraryGen (Smart a) #

shrink ∷ Smart a → [Smart a] #

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

Defined in Test.QuickCheck.Modifiers

Methods

arbitraryGen (SortedList a) #

shrink ∷ SortedList a → [SortedList a] #

Arbitrary a ⇒ Arbitrary (Stream a) 
Instance details

Defined in Data.Stream

Methods

arbitraryGen (Stream a) #

shrinkStream a → [Stream a] #

Arbitrary v ⇒ Arbitrary (KeyMap v) 
Instance details

Defined in Data.Aeson.KeyMap

Methods

arbitraryGen (KeyMap v) #

shrink ∷ KeyMap v → [KeyMap v] #

Arbitrary a ⇒ Arbitrary (ZipList a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen (ZipList a) #

shrinkZipList a → [ZipList a] #

Arbitrary a ⇒ Arbitrary (Complex a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen (Complex a) #

shrinkComplex a → [Complex a] #

Arbitrary a ⇒ Arbitrary (Identity a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen (Identity a) #

shrinkIdentity a → [Identity a] #

Arbitrary a ⇒ Arbitrary (First a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen (First a) #

shrinkFirst a → [First a] #

Arbitrary a ⇒ Arbitrary (Last a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen (Last a) #

shrinkLast a → [Last a] #

Arbitrary a ⇒ Arbitrary (Dual a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen (Dual a) #

shrinkDual a → [Dual a] #

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

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen (Endo a) #

shrinkEndo a → [Endo a] #

Arbitrary a ⇒ Arbitrary (Product a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen (Product a) #

shrinkProduct a → [Product a] #

Arbitrary a ⇒ Arbitrary (Sum a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen (Sum a) #

shrinkSum a → [Sum a] #

Integral a ⇒ Arbitrary (Ratio a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen (Ratio a) #

shrinkRatio a → [Ratio a] #

Arbitrary a ⇒ Arbitrary (IntMap a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen (IntMap a) #

shrinkIntMap a → [IntMap a] #

Arbitrary a ⇒ Arbitrary (Seq a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen (Seq a) #

shrinkSeq a → [Seq a] #

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

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen (Set a) #

shrinkSet a → [Set a] #

Arbitrary a ⇒ Arbitrary (Tree a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen (Tree a) #

shrinkTree 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

arbitraryGen (Kind ()) #

shrinkKind () → [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 a ⇒ Arbitrary (Maybe a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen (Maybe a) #

shrinkMaybe a → [Maybe a] #

Arbitrary a ⇒ Arbitrary [a] 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen [a] #

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

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

Defined in Test.QuickCheck.Function

Methods

arbitraryGen (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

arbitraryGen (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

arbitraryGen (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

arbitraryGen (WrappedMonad m a) #

shrinkWrappedMonad m a → [WrappedMonad m a] #

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

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen (Either a b) #

shrinkEither a b → [Either a b] #

HasResolution a ⇒ Arbitrary (Fixed a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen (Fixed a) #

shrinkFixed a → [Fixed a] #

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

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen (Map k v) #

shrinkMap 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

arbitraryGen (a, b) #

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

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

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen (a → b) #

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

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

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen (WrappedArrow a b c) #

shrinkWrappedArrow a b c → [WrappedArrow a b c] #

Arbitrary a ⇒ Arbitrary (Const a b) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen (Const a b) #

shrinkConst a b → [Const a b] #

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

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen (Alt f a) #

shrinkAlt f a → [Alt f a] #

Arbitrary a ⇒ Arbitrary (Constant a b) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen (Constant a b) #

shrinkConstant a b → [Constant a b] #

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

Defined in Test.QuickCheck.Arbitrary

Methods

arbitraryGen (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

arbitraryGen (Product f g a) #

shrinkProduct 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

arbitraryGen (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

arbitraryGen (Compose f g a) #

shrinkCompose 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

arbitraryGen (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

arbitraryGen (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

arbitraryGen (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

arbitraryGen (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

arbitraryGen (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

arbitraryGen (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

liftGenGen a → Gen a Source #

variantIntegral n ⇒ n → Gen a → Gen a Source #

sized ∷ (IntGen a) → Gen a Source #

resizeIntGen a → Gen a Source #

chooseRandom a ⇒ (a, a) → Gen a Source #

Testable prop ⇒ Testable (Gen prop) 
Instance details

Defined in Test.QuickCheck.Property

Methods

propertyGen prop → Property

propertyForAllShrinkShowGen a → (a → [a]) → (a → [String]) → (a → Gen prop) → Property

Orphan instances

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

Methods

askGenT m r Source #

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

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