plutarch-quickcheck-2.2.2: Quickcheck for Plutarch.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Plutarch.Test.QuickCheck.Instances

Description

A collection of QuickCheck instances. This doesn't export any identifiers, so should be imported with an empty import list.

Orphan instances

Arbitrary Data Source #

This instance constructs truly random Data. In most cases, you probably want something more specific.

Note

The shrinker shrinks 'within' a Data constructor: thus, B will shrink to B, I will shrink to I, etc. Constr is treated specially: shrinks will proceed in two ways:

  • Shrinking to a 'smaller' constructor tag; and
  • Shrinking the arg list.

Since: 2.1.3

Instance details

Arbitrary Address Source #

As neither Credential nor StakingCredential shrink, this type doesn't either.

Since: 2.1.3

Instance details

Arbitrary LedgerBytes Source #

Since: 2.1.3

Instance details

Arbitrary Credential Source #

This will generate either a PubKeyCredential or a ScriptCredential with equal probability. As neither PubKeyHash nor ValidatorHash shrink, this type doesn't either.

Since: 2.1.3

Instance details

Arbitrary StakingCredential Source #

Since: 2.1.3

Instance details

Arbitrary PubKeyHash Source #

This is based on PubKeyHash being a Blake2b-224 hash, which is 28 bytes long. This type does not shrink, as it wouldn't really make much sense to.

Since: 2.1.3

Instance details

Arbitrary Datum Source #

Since: 2.1.3

Instance details

Arbitrary DatumHash Source #

This is based on DatumHash being a Blake2b-256 hash, which is 32 bytes long. This type does not shrink, as it wouldn't really make much sense to.

Since: 2.1.3

Instance details

Arbitrary ScriptHash Source #

This is based on ScriptHash being a Blake2b-224 hash, which is 28 bytes long. This type does not shrink, as it wouldn't really make much sense to.

Since: 2.1.3

Instance details

Arbitrary DiffMilliSeconds Source #

Since: 2.1.3

Instance details

Arbitrary POSIXTime Source #

Since: 2.1.3

Instance details

Arbitrary TxId Source #

This is based on TxId being a Blake2b-256 hash, which is 32 bytes long. This type does not shrink, as it wouldn't really make much sense to.

Since: 2.1.3

Instance details

Arbitrary TxOutRef Source #

This will generate a zero-based index for the txOutRefIdx field. Furthermore, the shrinker will shrink only in the txOutRefIdx field toward zero, as TxIds do not shrink.

Since: 2.1.3

Instance details

Arbitrary TokenName Source #

This generates only those TokenNames corresponding to ASCII strings. This is somewhat limited, but otherwise would require UTF-8 encoding as part of the generator. It would also significantly complicate shrinks: we would have to re-encode, shrink, then decode again.

Since: 2.1.3

Instance details

Arbitrary OutputDatum Source #

The shrinker for this type will not shrink 'out-of-arm'. Effectively, this means NoOutputDatum does not shrink, OutputDatumHash also does not shrink (as DatumHash doesn't), and OutputDatum will shrink to other OutputDatums.

Since: 2.1.3

Instance details

Arbitrary TxOut Source #

Since: 2.1.3

Instance details

Arbitrary BuiltinByteString Source #

Since: 2.1.3

Instance details

Arbitrary BuiltinData Source #

Since: 2.1.3

Instance details

CoArbitrary Data Source #

Since: 2.1.3

Instance details

Methods

coarbitrary :: Data -> Gen b -> Gen b Source #

CoArbitrary Address Source #

Since: 2.1.3

Instance details

Methods

coarbitrary :: Address -> Gen b -> Gen b Source #

CoArbitrary LedgerBytes Source #

Since: 2.1.3

Instance details

Methods

coarbitrary :: LedgerBytes -> Gen b -> Gen b Source #

CoArbitrary Credential Source #

Since: 2.1.3

Instance details

Methods

coarbitrary :: Credential -> Gen b -> Gen b Source #

CoArbitrary StakingCredential Source #

Since: 2.1.3

Instance details

CoArbitrary PubKeyHash Source #

Since: 2.1.3

Instance details

Methods

coarbitrary :: PubKeyHash -> Gen b -> Gen b Source #

CoArbitrary Datum Source #

Since: 2.1.3

Instance details

Methods

coarbitrary :: Datum -> Gen b -> Gen b Source #

CoArbitrary DatumHash Source #

Since: 2.1.3

Instance details

Methods

coarbitrary :: DatumHash -> Gen b -> Gen b Source #

CoArbitrary ScriptHash Source #

Since: 2.1.3

Instance details

Methods

coarbitrary :: ScriptHash -> Gen b -> Gen b Source #

CoArbitrary DiffMilliSeconds Source #

Since: 2.1.3

Instance details

CoArbitrary POSIXTime Source #

Since: 2.1.3

Instance details

Methods

coarbitrary :: POSIXTime -> Gen b -> Gen b Source #

CoArbitrary TxId Source #

Since: 2.1.3

Instance details

Methods

coarbitrary :: TxId -> Gen b -> Gen b Source #

CoArbitrary TxOutRef Source #

Since: 2.1.3

Instance details

Methods

coarbitrary :: TxOutRef -> Gen b -> Gen b Source #

CoArbitrary TokenName Source #

Since: 2.1.3

Instance details

Methods

coarbitrary :: TokenName -> Gen b -> Gen b Source #

CoArbitrary OutputDatum Source #

Since: 2.1.3

Instance details

Methods

coarbitrary :: OutputDatum -> Gen b -> Gen b Source #

CoArbitrary TxOut Source #

Since: 2.1.3

Instance details

Methods

coarbitrary :: TxOut -> Gen b -> Gen b Source #

CoArbitrary BuiltinByteString Source #

Since: 2.1.3

Instance details

CoArbitrary BuiltinData Source #

Since: 2.1.3

Instance details

Methods

coarbitrary :: BuiltinData -> Gen b -> Gen b Source #

Function Data Source #

Since: 2.1.3

Instance details

Methods

function :: (Data -> b) -> Data :-> b Source #

Function Address Source #

Since: 2.1.3

Instance details

Methods

function :: (Address -> b) -> Address :-> b Source #

Function LedgerBytes Source #

Since: 2.1.3

Instance details

Methods

function :: (LedgerBytes -> b) -> LedgerBytes :-> b Source #

Function Credential Source #

Since: 2.1.3

Instance details

Methods

function :: (Credential -> b) -> Credential :-> b Source #

Function StakingCredential Source #

Since: 2.1.3

Instance details

Function PubKeyHash Source #

Since: 2.1.3

Instance details

Methods

function :: (PubKeyHash -> b) -> PubKeyHash :-> b Source #

Function Datum Source #

Since: 2.1.3

Instance details

Methods

function :: (Datum -> b) -> Datum :-> b Source #

Function DatumHash Source #

Since: 2.1.3

Instance details

Methods

function :: (DatumHash -> b) -> DatumHash :-> b Source #

Function ScriptHash Source #

Since: 2.1.3

Instance details

Methods

function :: (ScriptHash -> b) -> ScriptHash :-> b Source #

Function DiffMilliSeconds Source #

Since: 2.1.3

Instance details

Function POSIXTime Source #

Since: 2.1.3

Instance details

Methods

function :: (POSIXTime -> b) -> POSIXTime :-> b Source #

Function TxId Source #

Since: 2.1.3

Instance details

Methods

function :: (TxId -> b) -> TxId :-> b Source #

Function TxOutRef Source #

Since: 2.1.3

Instance details

Methods

function :: (TxOutRef -> b) -> TxOutRef :-> b Source #

Function TokenName Source #

Since: 2.3.1

Instance details

Methods

function :: (TokenName -> b) -> TokenName :-> b Source #

Function OutputDatum Source #

Since: 2.1.3

Instance details

Methods

function :: (OutputDatum -> b) -> OutputDatum :-> b Source #

Function TxOut Source #

Since: 2.1.3

Instance details

Methods

function :: (TxOut -> b) -> TxOut :-> b Source #

Function BuiltinByteString Source #

Since: 2.1.3

Instance details

Function BuiltinData Source #

Since: 2.1.3

Instance details

Methods

function :: (BuiltinData -> b) -> BuiltinData :-> b Source #