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

PlutusCore.Value

Synopsis

Documentation

data Value Source #

The underlying type of the UPLC built-in type Value.

Instances

Instances details
Generic Value Source # 
Instance details

Defined in PlutusCore.Value

Associated Types

type Rep ValueTypeType Source #

Methods

fromValueRep Value x Source #

toRep Value x → Value Source #

Show Value Source # 
Instance details

Defined in PlutusCore.Value

NFData Value Source # 
Instance details

Defined in PlutusCore.Value

Methods

rnfValue → () Source #

Eq Value Source # 
Instance details

Defined in PlutusCore.Value

Methods

(==)ValueValueBool Source #

(/=)ValueValueBool Source #

Hashable Value Source # 
Instance details

Defined in PlutusCore.Value

Methods

hashWithSaltIntValueInt Source #

hashValueInt Source #

ExMemoryUsage Value Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemoryUsage

Flat Value Source # 
Instance details

Defined in PlutusCore.Value

Pretty Value Source # 
Instance details

Defined in PlutusCore.Value

Methods

prettyValueDoc ann Source #

prettyList ∷ [Value] → Doc ann Source #

Serialise Value Source # 
Instance details

Defined in PlutusCore.Value

PrettyBy ConstConfig Value Source # 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

Methods

prettyByConstConfigValueDoc ann Source #

prettyListByConstConfig → [Value] → Doc ann Source #

KnownBuiltinTypeIn DefaultUni term ValueMakeKnownIn DefaultUni term Value Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnownValueBuiltinResult term Source #

KnownBuiltinTypeIn DefaultUni term ValueReadKnownIn DefaultUni term Value Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown ∷ term → ReadKnownM Value Source #

Contains DefaultUni Value Source # 
Instance details

Defined in PlutusCore.Default.Universe

KnownBuiltinTypeAst tyname DefaultUni ValueKnownTypeAst tyname DefaultUni Value Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

typeAstType tyname DefaultUni () Source #

type Rep Value Source # 
Instance details

Defined in PlutusCore.Value

type IsBuiltin DefaultUni Value Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToBinds DefaultUni acc Value Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToHoles DefaultUni hole Value Source # 
Instance details

Defined in PlutusCore.Default.Universe

data K Source #

A ByteString with maximum length of maxKeyLen bytes.

Instances

Instances details
Generic K Source # 
Instance details

Defined in PlutusCore.Value

Associated Types

type Rep KTypeType Source #

Methods

fromKRep K x Source #

toRep K x → K Source #

Show K Source # 
Instance details

Defined in PlutusCore.Value

Methods

showsPrecIntKShowS Source #

showKString Source #

showList ∷ [K] → ShowS Source #

NFData K Source # 
Instance details

Defined in PlutusCore.Value

Methods

rnfK → () Source #

Eq K Source # 
Instance details

Defined in PlutusCore.Value

Methods

(==)KKBool Source #

(/=)KKBool Source #

Ord K Source # 
Instance details

Defined in PlutusCore.Value

Methods

compareKKOrdering Source #

(<)KKBool Source #

(<=)KKBool Source #

(>)KKBool Source #

(>=)KKBool Source #

maxKKK Source #

minKKK Source #

Hashable K Source # 
Instance details

Defined in PlutusCore.Value

Methods

hashWithSaltIntKInt Source #

hashKInt Source #

Flat K Source # 
Instance details

Defined in PlutusCore.Value

Methods

encodeKEncoding Source #

decodeGet K Source #

sizeKNumBitsNumBits Source #

Serialise K Source # 
Instance details

Defined in PlutusCore.Value

PrettyBy ConstConfig K Source # 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

Methods

prettyByConstConfigKDoc ann Source #

prettyListByConstConfig → [K] → Doc ann Source #

type Rep K Source # 
Instance details

Defined in PlutusCore.Value

type Rep K = D1 ('MetaData "K" "PlutusCore.Value" "plutus-core-1.54.0.0-inplace" 'True) (C1 ('MetaCons "UnsafeK" 'PrefixI 'True) (S1 ('MetaSel ('Just "unK") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)))

unpackValueNestedMap Source #

Unpack a Value into a map from (currency symbol, token name) to amount.

The map is guaranteed to not contain empty inner map or zero amount.

packNestedMapValue Source #

Pack a map from (currency symbol, token name) to amount into a Value.

The map will be filtered so that it does not contain empty inner map or zero amount.

fromList ∷ [(K, [(K, Integer)])] → Value Source #

toListValue → [(K, [(K, Integer)])] Source #

totalSizeValueInt Source #

Total size, i.e., the number of distinct `(currency symbol, token name)` pairs contained in the Value.

maxInnerSizeValueInt Source #

Size of the largest inner map.

insertCoinByteStringByteStringIntegerValueBuiltinResult Value Source #

\(O(\log \max(m, k))\), where \(m\) is the size of the outer map, and \(k\) is the size of the largest inner map.

deleteCoinByteStringByteStringValueValue Source #

\(O(\log \max(m, k))\)

lookupCoinByteStringByteStringValueInteger Source #

\(O(\log \max(m, k))\)

valueContainsValueValueBuiltinResult Bool Source #

\(O(n_{2}\log \max(m_{1}, k_{1}))\), where \(n_{2}\) is the total size of the second Value, \(m_{1}\) is the size of the outer map in the first Value and \(k_{1}\) is the size of the largest inner map in the first Value.

a contains b if for each (currency, token, amount) in b, if amount > 0, then lookup currency token a >= amount, and if amount < 0, then lookup currency token a == amount.

unionValueValueValueValue Source #

The precise complexity is complicated, but an upper bound is \(O(n_{1} \log n_{2}) + O(m)\), where \(n_{1}\) is the total size of the smaller value, \(n_{2}\) is the total size of the bigger value, and \(m\) is the combined size of the outer maps.

valueDataValueData Source #

\(O(n)\). Encodes Value as Data, in the same way as non-builtin Value. This is the denotation of ValueData in Plutus V1, V2 and V3.

unValueDataDataBuiltinResult Value Source #

\(O(n \log n)\). Decodes Data into Value, in the same way as non-builtin Value. This is the denotation of UnValueData in Plutus V1, V2 and V3.