plutarch-orphanage-1.0.3
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusLedgerApi.QuickCheck.Utils

Synopsis

Documentation

data SizedByteString (n :: Natural) where Source #

Helper for ByteStrings of a fixed length. We don't expose the constructor, instead providing a read-only pattern, as well as an accessor function, to ensure that the size invariant is maintained.

Since: 1.0.0

Bundled Patterns

pattern SizedByteString :: forall (n :: Natural). ByteString -> SizedByteString n

Read-only pattern for accessing the underlying ByteString. Use it just like you would use a data constructor in a pattern match.

Since: 1.0.0

Instances

Instances details
KnownNat n => Arbitrary (SizedByteString n) Source #

Since: 1.0.0

Instance details

Defined in PlutusLedgerApi.QuickCheck.Utils

CoArbitrary (SizedByteString n) Source #

Since: 1.0.0

Instance details

Defined in PlutusLedgerApi.QuickCheck.Utils

Methods

coarbitrary :: SizedByteString n -> Gen b -> Gen b

Function (SizedByteString n) Source #

Since: 1.0.0

Instance details

Defined in PlutusLedgerApi.QuickCheck.Utils

Methods

function :: (SizedByteString n -> b) -> SizedByteString n :-> b

Show (SizedByteString n) Source #

Since: 1.0.0

Instance details

Defined in PlutusLedgerApi.QuickCheck.Utils

Eq (SizedByteString n) Source #

Since: 1.0.0

Instance details

Defined in PlutusLedgerApi.QuickCheck.Utils

Ord (SizedByteString n) Source #

Since: 1.0.0

Instance details

Defined in PlutusLedgerApi.QuickCheck.Utils

unSizedByteString :: forall (n :: Natural). SizedByteString n -> ByteString Source #

Get the underlying ByteString. It is guaranteed to have the length specified in its type.

Since: 1.0.0

data AsWord64 where Source #

Plutus' ledger API often has to 'fake' Word64 using the much larger Integer type. This helper is designed to generate Integers that fit into Word64.

We don't expose the constructor directly; instead, we provide a read-only pattern and an accessor function.

Since: 1.0.0

Bundled Patterns

pattern AsWord64 :: Integer -> AsWord64

Read-only pattern for accessing the underlying Integer. Use it just like you would use a data constructor in a pattern match.

Since: 1.0.0

Instances

Instances details
Arbitrary AsWord64 Source #

Since: 1.0.0

Instance details

Defined in PlutusLedgerApi.QuickCheck.Utils

CoArbitrary AsWord64 Source #

Since: 1.0.0

Instance details

Defined in PlutusLedgerApi.QuickCheck.Utils

Methods

coarbitrary :: AsWord64 -> Gen b -> Gen b

Function AsWord64 Source #

Since: 1.0.0

Instance details

Defined in PlutusLedgerApi.QuickCheck.Utils

Methods

function :: (AsWord64 -> b) -> AsWord64 :-> b

Show AsWord64 Source #

Since: 1.0.0

Instance details

Defined in PlutusLedgerApi.QuickCheck.Utils

Eq AsWord64 Source #

Since: 1.0.0

Instance details

Defined in PlutusLedgerApi.QuickCheck.Utils

Ord AsWord64 Source #

Since: 1.0.0

Instance details

Defined in PlutusLedgerApi.QuickCheck.Utils