plutarch-orphanage-1.0.3
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusLedgerApi.V2.Orphans

Description

QuickCheck orphans (plus a few helpers) for V2 Plutus ledger API types.

Synopsis

Documentation

newtype NonAdaValue Source #

A Value that contains zero Ada.

Note

This is designed to act as a modifier, and thus, we expose the constructor even though it preserves invariants. If you use the constructor directly, be very certain that the Value being wrapped satisfies the invariants described above: failing to do so means all guarantees of this type are off the table.

Since: 1.0.0

Constructors

NonAdaValue Value 

Instances

Instances details
Arbitrary NonAdaValue Source #

Since: 1.0.0

Instance details

Defined in PlutusLedgerApi.V1.Orphans.Value

CoArbitrary NonAdaValue Source #

Since: 1.0.0

Instance details

Defined in PlutusLedgerApi.V1.Orphans.Value

Methods

coarbitrary :: NonAdaValue -> Gen b -> Gen b

Function NonAdaValue Source #

Since: 1.0.0

Instance details

Defined in PlutusLedgerApi.V1.Orphans.Value

Methods

function :: (NonAdaValue -> b) -> NonAdaValue :-> b

Show NonAdaValue Source #

Since: 1.0.0

Instance details

Defined in PlutusLedgerApi.V1.Orphans.Value

Eq NonAdaValue Source #

Since: 1.0.0

Instance details

Defined in PlutusLedgerApi.V1.Orphans.Value

getNonAdaValue :: NonAdaValue -> Value Source #

Since: 1.0.0

newtype UTxOValue Source #

A Value suitable for TxOut. Specifically:

  • The Value is sorted by both keys (meaning CurrencySymbol and TokenName);
  • There exists an Ada amount; and
  • All amounts are positive.

Note

This is designed to act as a modifier, and thus, we expose the constructor even though it preserves invariants. If you use the constructor directly, be very certain that the Value being wrapped satisfies the invariants described above: failing to do so means all guarantees of this type are off the table.

Since: 1.0.2

Constructors

UTxOValue Value 

Instances

Instances details
Arbitrary UTxOValue Source #

Since: 1.0.2

Instance details

Defined in PlutusLedgerApi.V1.Orphans.Value

CoArbitrary UTxOValue Source #

Since: 1.0.0

Instance details

Defined in PlutusLedgerApi.V1.Orphans.Value

Methods

coarbitrary :: UTxOValue -> Gen b -> Gen b

Function UTxOValue Source #

Since: 1.0.0

Instance details

Defined in PlutusLedgerApi.V1.Orphans.Value

Methods

function :: (UTxOValue -> b) -> UTxOValue :-> b

Show UTxOValue Source #

Since: 1.0.0

Instance details

Defined in PlutusLedgerApi.V1.Orphans.Value

Eq UTxOValue Source #

Since: 1.0.0

Instance details

Defined in PlutusLedgerApi.V1.Orphans.Value

Pretty UTxOValue Source # 
Instance details

Defined in PlutusLedgerApi.V1.Orphans.Value

Methods

pretty :: UTxOValue -> Doc ann

prettyList :: [UTxOValue] -> Doc ann

getUtxoValue :: UTxOValue -> Value Source #

Since: 1.0.0

newtype FeeValue Source #

A Value containing only Ada, suitable for fees. Furthermore, the Ada quantity is positive.

Note

This is designed to act as a modifier, and thus, we expose the constructor even though it preserves invariants. If you use the constructor directly, be very certain that the Value being wrapped satisfies the invariants described above: failing to do so means all guarantees of this type are off the table.

Since: 1.0.0

Constructors

FeeValue Value 

Instances

Instances details
Arbitrary FeeValue Source #

Since: 1.0.0

Instance details

Defined in PlutusLedgerApi.V1.Orphans.Value

CoArbitrary FeeValue Source #

Since: 1.0.0

Instance details

Defined in PlutusLedgerApi.V1.Orphans.Value

Methods

coarbitrary :: FeeValue -> Gen b -> Gen b

Function FeeValue Source #

Since: 1.0.0

Instance details

Defined in PlutusLedgerApi.V1.Orphans.Value

Methods

function :: (FeeValue -> b) -> FeeValue :-> b

Show FeeValue Source #

Since: 1.0.0

Instance details

Defined in PlutusLedgerApi.V1.Orphans.Value

Eq FeeValue Source #

Since: 1.0.0

Instance details

Defined in PlutusLedgerApi.V1.Orphans.Value

getFeeValue :: FeeValue -> Value Source #

Since: 1.0.0

Orphan instances

Arbitrary Data Source #

This is a very general instance, able to produce Data of basically any shape. You probably want something more focused than this.

Since: 1.0.0

Instance details

Methods

arbitrary :: Gen Data

shrink :: Data -> [Data]

Arbitrary LedgerBytes Source #

Since: 1.0.0

Instance details

Methods

arbitrary :: Gen LedgerBytes

shrink :: LedgerBytes -> [LedgerBytes]

Arbitrary ScriptContext Source #

Since: 1.0.0

Instance details

Methods

arbitrary :: Gen ScriptContext

shrink :: ScriptContext -> [ScriptContext]

CoArbitrary Data Source #

Since: 1.0.0

Instance details

Methods

coarbitrary :: Data -> Gen b -> Gen b

CoArbitrary LedgerBytes Source #

Since: 1.0.0

Instance details

Methods

coarbitrary :: LedgerBytes -> Gen b -> Gen b

CoArbitrary ScriptContext Source #

Since: 1.0.0

Instance details

Methods

coarbitrary :: ScriptContext -> Gen b -> Gen b

Function Data Source #

Since: 1.0.0

Instance details

Methods

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

Function LedgerBytes Source #

Since: 1.0.0

Instance details

Methods

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

Function ScriptContext Source #

Since: 1.0.0

Instance details

Methods

function :: (ScriptContext -> b) -> ScriptContext :-> b