plutarch
Safe HaskellNone
LanguageGHC2021

Plutarch.Builtin.Array

Synopsis

Documentation

newtype PArray (a :: S -> Type) (s :: S) Source #

A packed collection of values.

Since: 1.11.0

Constructors

PArray (Term s (PArray a)) 

Instances

Instances details
(Contains DefaultUni (PlutusRepr a), PLiftable a, KnownBuiltinType (Term DeBruijn DefaultUni DefaultFun ()) (PlutusRepr a)) => PLiftable (PArray a) Source #

Since: 1.13.0

Instance details

Defined in Plutarch.Internal.Lift

Associated Types

type AsHaskell (PArray a) 
Instance details

Defined in Plutarch.Internal.Lift

type AsHaskell (PArray a) = Vector (AsHaskell a)
type PlutusRepr (PArray a) 
Instance details

Defined in Plutarch.Internal.Lift

type PlutusRepr (PArray a) = Vector (PlutusRepr a)
PlutusType (PArray a) Source #

Since: 1.11.0

Instance details

Defined in Plutarch.Internal.PlutusType

Associated Types

type PInner (PArray a) 
Instance details

Defined in Plutarch.Internal.PlutusType

type PInner (PArray a) = PArray a

Methods

pcon' :: forall (s :: S). PArray a s -> Term s (PInner (PArray a)) Source #

pmatch' :: forall (s :: S) (b :: S -> Type). Term s (PInner (PArray a)) -> (PArray a s -> Term s b) -> Term s b Source #

Generic (PArray a s) Source # 
Instance details

Defined in Plutarch.Builtin.Array

Associated Types

type Rep (PArray a s)

Since: plutarch-1.11.0

Instance details

Defined in Plutarch.Builtin.Array

type Rep (PArray a s) = D1 ('MetaData "PArray" "Plutarch.Builtin.Array" "plutarch-1.14.0-6fw3gqGsL7f3TFINWPu1lG" 'True) (C1 ('MetaCons "PArray" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term s (PArray a)))))

Methods

from :: PArray a s -> Rep (PArray a s) x Source #

to :: Rep (PArray a s) x -> PArray a s Source #

Generic (PArray a s) Source # 
Instance details

Defined in Plutarch.Builtin.Array

Associated Types

type Code (PArray a s)

Since: plutarch-1.11.0

Instance details

Defined in Plutarch.Builtin.Array

type Code (PArray a s) = GCode (PArray a s)

Methods

from :: PArray a s -> Rep (PArray a s)

to :: Rep (PArray a s) -> PArray a s

type AsHaskell (PArray a) Source # 
Instance details

Defined in Plutarch.Internal.Lift

type AsHaskell (PArray a) = Vector (AsHaskell a)
type PlutusRepr (PArray a) Source # 
Instance details

Defined in Plutarch.Internal.Lift

type PlutusRepr (PArray a) = Vector (PlutusRepr a)
type PInner (PArray a) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PInner (PArray a) = PArray a
type Rep (PArray a s) Source #

Since: 1.11.0

Instance details

Defined in Plutarch.Builtin.Array

type Rep (PArray a s) = D1 ('MetaData "PArray" "Plutarch.Builtin.Array" "plutarch-1.14.0-6fw3gqGsL7f3TFINWPu1lG" 'True) (C1 ('MetaCons "PArray" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term s (PArray a)))))
type Code (PArray a s) Source #

Since: 1.11.0

Instance details

Defined in Plutarch.Builtin.Array

type Code (PArray a s) = GCode (PArray a s)

plengthOfArray :: forall (a :: S -> Type) (s :: S). Term s (PArray a :--> PInteger) Source #

Get the length of an array, as per CIP-138.

Since: 1.11.0

plistToArray :: forall (a :: S -> Type) (s :: S). Term s (PBuiltinList a :--> PArray a) Source #

Convert a (builtin) list to an array with the same contents in the same order, as per CIP-138.

Since: 1.11.0

pindexArray :: forall (a :: S -> Type) (s :: S). Term s (PArray a :--> (PInteger :--> a)) Source #

Index an array, as per CIP-138.

Since: 1.11.0