plutarch-1.10.1
Safe HaskellSafe-Inferred
LanguageGHC2021

Plutarch.Builtin.Data

Synopsis

Documentation

newtype PData (s :: S) Source #

Constructors

PData (Term s PData) 

Instances

Instances details
PEq PData Source # 
Instance details

Defined in Plutarch.Internal.Eq

Methods

(#==) :: forall (s :: S). Term s PData -> Term s PData -> Term s PBool Source #

PIsData PData Source # 
Instance details

Defined in Plutarch.Internal.IsData

Methods

pfromDataImpl :: forall (s :: S). Term s (PAsData PData) -> Term s PData Source #

pdataImpl :: forall (s :: S). Term s PData -> Term s PData Source #

PLiftable PData Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Internal.Lift

Associated Types

type AsHaskell PData Source #

type PlutusRepr PData Source #

PlutusType PData Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

Methods

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

pmatch' :: forall (s :: S) (b :: PType). Term s (PInner PData) -> (PData s -> Term s b) -> Term s b Source #

PShow PData Source # 
Instance details

Defined in Plutarch.Internal.Show

Methods

pshow' :: forall (s :: S). Bool -> Term s PData -> Term s PString Source #

PTryFrom PData PData Source # 
Instance details

Defined in Plutarch.Internal.TryFrom

Associated Types

type PTryFromExcess PData PData :: PType Source #

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s PData, Reduce (PTryFromExcess PData PData s)) -> Term s r) -> Term s r Source #

(PIsData a, PTryFrom PData (PAsData a)) => PTryFrom PData (PDataNewtype a) Source #

Since: 1.7.0

Instance details

Defined in Plutarch.Builtin

Associated Types

type PTryFromExcess PData (PDataNewtype a) :: PType Source #

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PDataNewtype a), Reduce (PTryFromExcess PData (PDataNewtype a) s)) -> Term s r) -> Term s r Source #

PTryFrom PData (PAsData (PDataNewtype a)) Source #

Since: 1.7.0

Instance details

Defined in Plutarch.Builtin

Associated Types

type PTryFromExcess PData (PAsData (PDataNewtype a)) :: PType Source #

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PAsData (PDataNewtype a)), Reduce (PTryFromExcess PData (PAsData (PDataNewtype a)) s)) -> Term s r) -> Term s r Source #

PTryFrom PData (PAsData PBool) Source #

Since: 1.7.0

Instance details

Defined in Plutarch.Internal.TryFrom

Associated Types

type PTryFromExcess PData (PAsData PBool) :: PType Source #

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PAsData PBool), Reduce (PTryFromExcess PData (PAsData PBool) s)) -> Term s r) -> Term s r Source #

PTryFrom PData (PAsData PByteString) Source # 
Instance details

Defined in Plutarch.Internal.TryFrom

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PAsData PByteString), Reduce (PTryFromExcess PData (PAsData PByteString) s)) -> Term s r) -> Term s r Source #

(PTryFrom PData (PAsData a), PIsData a) => PTryFrom PData (PAsData (PBuiltinList (PAsData a))) Source #

Recover a `PBuiltinList (PAsData a)`

Instance details

Defined in Plutarch.Internal.TryFrom

Associated Types

type PTryFromExcess PData (PAsData (PBuiltinList (PAsData a))) :: PType Source #

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PAsData (PBuiltinList (PAsData a))), Reduce (PTryFromExcess PData (PAsData (PBuiltinList (PAsData a))) s)) -> Term s r) -> Term s r Source #

PTryFrom PData (PAsData (PBuiltinList PData)) Source #

This verifies a list to be indeed a list but doesn't recover the inner data use this instance instead of the one for `PData (PAsData (PBuiltinList (PAsData a)))` as this is O(1) instead of O(n)

Instance details

Defined in Plutarch.Internal.TryFrom

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PAsData (PBuiltinList PData)), Reduce (PTryFromExcess PData (PAsData (PBuiltinList PData)) s)) -> Term s r) -> Term s r Source #

(PTryFrom PData a, a ~ PAsData a', PIsData a', PTryFrom PData b, b ~ PAsData b', PIsData b') => PTryFrom PData (PAsData (PBuiltinPair a b)) Source #

Recover a `PAsData (PBuiltinPair a b)`

Instance details

Defined in Plutarch.Internal.TryFrom

Associated Types

type PTryFromExcess PData (PAsData (PBuiltinPair a b)) :: PType Source #

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PAsData (PBuiltinPair a b)), Reduce (PTryFromExcess PData (PAsData (PBuiltinPair a b)) s)) -> Term s r) -> Term s r Source #

PTryFrom PData (PAsData PData) Source # 
Instance details

Defined in Plutarch.Internal.TryFrom

Associated Types

type PTryFromExcess PData (PAsData PData) :: PType Source #

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PAsData PData), Reduce (PTryFromExcess PData (PAsData PData) s)) -> Term s r) -> Term s r Source #

PTryFrom PData (PAsData PInteger) Source # 
Instance details

Defined in Plutarch.Internal.TryFrom

Associated Types

type PTryFromExcess PData (PAsData PInteger) :: PType Source #

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PAsData PInteger), Reduce (PTryFromExcess PData (PAsData PInteger) s)) -> Term s r) -> Term s r Source #

(PTryFrom PData a, PTryFrom PData b) => PTryFrom PData (PAsData (PEitherData a b)) Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Either

Associated Types

type PTryFromExcess PData (PAsData (PEitherData a b)) :: PType Source #

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PAsData (PEitherData a b)), Reduce (PTryFromExcess PData (PAsData (PEitherData a b)) s)) -> Term s r) -> Term s r Source #

PTryFrom PData (PAsData PPositive) Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Internal.TryFrom

Associated Types

type PTryFromExcess PData (PAsData PPositive) :: PType Source #

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PAsData PPositive), Reduce (PTryFromExcess PData (PAsData PPositive) s)) -> Term s r) -> Term s r Source #

PTryFrom PData (PAsData PRational) Source #

NOTE: This instance produces a verified PPositive as the excess output.

Instance details

Defined in Plutarch.Rational

Associated Types

type PTryFromExcess PData (PAsData PRational) :: PType Source #

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PAsData PRational), Reduce (PTryFromExcess PData (PAsData PRational) s)) -> Term s r) -> Term s r Source #

(PTryFrom PData a, PTryFrom PData b) => PTryFrom PData (PEitherData a b) Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Either

Associated Types

type PTryFromExcess PData (PEitherData a b) :: PType Source #

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PEitherData a b), Reduce (PTryFromExcess PData (PEitherData a b) s)) -> Term s r) -> Term s r Source #

PIsData (PBuiltinPair PData PData) Source # 
Instance details

Defined in Plutarch.Internal.IsData

PIsData (PBuiltinPair PInteger (PBuiltinList PData)) Source # 
Instance details

Defined in Plutarch.Internal.IsData

type AsHaskell PData Source # 
Instance details

Defined in Plutarch.Internal.Lift

type AsHaskell PData = Data
type PlutusRepr PData Source # 
Instance details

Defined in Plutarch.Internal.Lift

type PlutusRepr PData = Data
type PContravariant' PData Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PCovariant' PData Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PCovariant' PData = ()
type PInner PData Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PVariant' PData Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PVariant' PData = ()
type PTryFromExcess PData PData Source # 
Instance details

Defined in Plutarch.Internal.TryFrom

type PTryFromExcess PData (PDataNewtype a) Source # 
Instance details

Defined in Plutarch.Builtin

type PTryFromExcess PData (PAsData (PDataNewtype a)) Source # 
Instance details

Defined in Plutarch.Builtin

type PTryFromExcess PData (PAsData PBool) Source # 
Instance details

Defined in Plutarch.Internal.TryFrom

type PTryFromExcess PData (PAsData PByteString) Source # 
Instance details

Defined in Plutarch.Internal.TryFrom

type PTryFromExcess PData (PAsData (PBuiltinList (PAsData a))) Source # 
Instance details

Defined in Plutarch.Internal.TryFrom

type PTryFromExcess PData (PAsData (PBuiltinList PData)) Source # 
Instance details

Defined in Plutarch.Internal.TryFrom

type PTryFromExcess PData (PAsData (PBuiltinPair a b)) Source # 
Instance details

Defined in Plutarch.Internal.TryFrom

type PTryFromExcess PData (PAsData PData) Source # 
Instance details

Defined in Plutarch.Internal.TryFrom

type PTryFromExcess PData (PAsData PInteger) Source # 
Instance details

Defined in Plutarch.Internal.TryFrom

type PTryFromExcess PData (PAsData (PEitherData a b)) Source # 
Instance details

Defined in Plutarch.Either

type PTryFromExcess PData (PAsData PPositive) Source # 
Instance details

Defined in Plutarch.Internal.TryFrom

type PTryFromExcess PData (PAsData PRational) Source # 
Instance details

Defined in Plutarch.Rational

type PTryFromExcess PData (PEitherData a b) Source # 
Instance details

Defined in Plutarch.Either

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

Constructors

PAsData (Term s a) 

Instances

Instances details
PTryFrom PData (PAsData (PDataNewtype a)) Source #

Since: 1.7.0

Instance details

Defined in Plutarch.Builtin

Associated Types

type PTryFromExcess PData (PAsData (PDataNewtype a)) :: PType Source #

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PAsData (PDataNewtype a)), Reduce (PTryFromExcess PData (PAsData (PDataNewtype a)) s)) -> Term s r) -> Term s r Source #

PTryFrom PData (PAsData PBool) Source #

Since: 1.7.0

Instance details

Defined in Plutarch.Internal.TryFrom

Associated Types

type PTryFromExcess PData (PAsData PBool) :: PType Source #

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PAsData PBool), Reduce (PTryFromExcess PData (PAsData PBool) s)) -> Term s r) -> Term s r Source #

PTryFrom PData (PAsData PByteString) Source # 
Instance details

Defined in Plutarch.Internal.TryFrom

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PAsData PByteString), Reduce (PTryFromExcess PData (PAsData PByteString) s)) -> Term s r) -> Term s r Source #

(PTryFrom PData (PAsData a), PIsData a) => PTryFrom PData (PAsData (PBuiltinList (PAsData a))) Source #

Recover a `PBuiltinList (PAsData a)`

Instance details

Defined in Plutarch.Internal.TryFrom

Associated Types

type PTryFromExcess PData (PAsData (PBuiltinList (PAsData a))) :: PType Source #

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PAsData (PBuiltinList (PAsData a))), Reduce (PTryFromExcess PData (PAsData (PBuiltinList (PAsData a))) s)) -> Term s r) -> Term s r Source #

PTryFrom PData (PAsData (PBuiltinList PData)) Source #

This verifies a list to be indeed a list but doesn't recover the inner data use this instance instead of the one for `PData (PAsData (PBuiltinList (PAsData a)))` as this is O(1) instead of O(n)

Instance details

Defined in Plutarch.Internal.TryFrom

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PAsData (PBuiltinList PData)), Reduce (PTryFromExcess PData (PAsData (PBuiltinList PData)) s)) -> Term s r) -> Term s r Source #

(PTryFrom PData a, a ~ PAsData a', PIsData a', PTryFrom PData b, b ~ PAsData b', PIsData b') => PTryFrom PData (PAsData (PBuiltinPair a b)) Source #

Recover a `PAsData (PBuiltinPair a b)`

Instance details

Defined in Plutarch.Internal.TryFrom

Associated Types

type PTryFromExcess PData (PAsData (PBuiltinPair a b)) :: PType Source #

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PAsData (PBuiltinPair a b)), Reduce (PTryFromExcess PData (PAsData (PBuiltinPair a b)) s)) -> Term s r) -> Term s r Source #

PTryFrom PData (PAsData PData) Source # 
Instance details

Defined in Plutarch.Internal.TryFrom

Associated Types

type PTryFromExcess PData (PAsData PData) :: PType Source #

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PAsData PData), Reduce (PTryFromExcess PData (PAsData PData) s)) -> Term s r) -> Term s r Source #

PTryFrom PData (PAsData PInteger) Source # 
Instance details

Defined in Plutarch.Internal.TryFrom

Associated Types

type PTryFromExcess PData (PAsData PInteger) :: PType Source #

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PAsData PInteger), Reduce (PTryFromExcess PData (PAsData PInteger) s)) -> Term s r) -> Term s r Source #

(PTryFrom PData a, PTryFrom PData b) => PTryFrom PData (PAsData (PEitherData a b)) Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Either

Associated Types

type PTryFromExcess PData (PAsData (PEitherData a b)) :: PType Source #

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PAsData (PEitherData a b)), Reduce (PTryFromExcess PData (PAsData (PEitherData a b)) s)) -> Term s r) -> Term s r Source #

PTryFrom PData (PAsData PPositive) Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Internal.TryFrom

Associated Types

type PTryFromExcess PData (PAsData PPositive) :: PType Source #

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PAsData PPositive), Reduce (PTryFromExcess PData (PAsData PPositive) s)) -> Term s r) -> Term s r Source #

PTryFrom PData (PAsData PRational) Source #

NOTE: This instance produces a verified PPositive as the excess output.

Instance details

Defined in Plutarch.Rational

Associated Types

type PTryFromExcess PData (PAsData PRational) :: PType Source #

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PAsData PRational), Reduce (PTryFromExcess PData (PAsData PRational) s)) -> Term s r) -> Term s r Source #

PEq (PAsData a) Source # 
Instance details

Defined in Plutarch.Internal.Eq

Methods

(#==) :: forall (s :: S). Term s (PAsData a) -> Term s (PAsData a) -> Term s PBool Source #

(ToData (AsHaskell a), FromData (AsHaskell a), PIsData a) => PLiftable (PAsData a) Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Internal.Lift

Associated Types

type AsHaskell (PAsData a) Source #

type PlutusRepr (PAsData a) Source #

PIsData a => PlutusType (PAsData a) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

Associated Types

type PInner (PAsData a) :: PType Source #

type PCovariant' (PAsData a) Source #

type PContravariant' (PAsData a) Source #

type PVariant' (PAsData a) Source #

Methods

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

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

(PIsData a, PShow a) => PShow (PAsData a) Source # 
Instance details

Defined in Plutarch.Internal.Show

Methods

pshow' :: forall (s :: S). Bool -> Term s (PAsData a) -> Term s PString Source #

PIsData (PBuiltinPair (PAsData a) (PAsData b)) Source # 
Instance details

Defined in Plutarch.Internal.IsData

Methods

pfromDataImpl :: forall (s :: S). Term s (PAsData (PBuiltinPair (PAsData a) (PAsData b))) -> Term s (PBuiltinPair (PAsData a) (PAsData b)) Source #

pdataImpl :: forall (s :: S). Term s (PBuiltinPair (PAsData a) (PAsData b)) -> Term s PData Source #

type PTryFromExcess PData (PAsData (PDataNewtype a)) Source # 
Instance details

Defined in Plutarch.Builtin

type PTryFromExcess PData (PAsData PBool) Source # 
Instance details

Defined in Plutarch.Internal.TryFrom

type PTryFromExcess PData (PAsData PByteString) Source # 
Instance details

Defined in Plutarch.Internal.TryFrom

type PTryFromExcess PData (PAsData (PBuiltinList (PAsData a))) Source # 
Instance details

Defined in Plutarch.Internal.TryFrom

type PTryFromExcess PData (PAsData (PBuiltinList PData)) Source # 
Instance details

Defined in Plutarch.Internal.TryFrom

type PTryFromExcess PData (PAsData (PBuiltinPair a b)) Source # 
Instance details

Defined in Plutarch.Internal.TryFrom

type PTryFromExcess PData (PAsData PData) Source # 
Instance details

Defined in Plutarch.Internal.TryFrom

type PTryFromExcess PData (PAsData PInteger) Source # 
Instance details

Defined in Plutarch.Internal.TryFrom

type PTryFromExcess PData (PAsData (PEitherData a b)) Source # 
Instance details

Defined in Plutarch.Either

type PTryFromExcess PData (PAsData PPositive) Source # 
Instance details

Defined in Plutarch.Internal.TryFrom

type PTryFromExcess PData (PAsData PRational) Source # 
Instance details

Defined in Plutarch.Rational

type AsHaskell (PAsData a) Source # 
Instance details

Defined in Plutarch.Internal.Lift

type PlutusRepr (PAsData a) Source # 
Instance details

Defined in Plutarch.Internal.Lift

type PlutusRepr (PAsData a) = Data
type PContravariant' (PAsData a) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PCovariant' (PAsData a) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PInner (PAsData a) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PInner (PAsData a) = PData
type PVariant' (PAsData a) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

pchooseData :: Term s (PData :--> (a :--> (a :--> (a :--> (a :--> (a :--> a)))))) Source #

pserialiseData :: Term s (PData :--> PByteString) Source #

Serialise any builtin data to its cbor represented by a builtin bytestring

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

Constructors

PBuiltinPair (Term s (PBuiltinPair a b)) 

Instances

Instances details
(PTryFrom PData a, a ~ PAsData a', PIsData a', PTryFrom PData b, b ~ PAsData b', PIsData b') => PTryFrom PData (PAsData (PBuiltinPair a b)) Source #

Recover a `PAsData (PBuiltinPair a b)`

Instance details

Defined in Plutarch.Internal.TryFrom

Associated Types

type PTryFromExcess PData (PAsData (PBuiltinPair a b)) :: PType Source #

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PAsData (PBuiltinPair a b)), Reduce (PTryFromExcess PData (PAsData (PBuiltinPair a b)) s)) -> Term s r) -> Term s r Source #

(PEq a, PEq b) => PEq (PBuiltinPair a b) Source # 
Instance details

Defined in Plutarch.Internal.Eq

Methods

(#==) :: forall (s :: S). Term s (PBuiltinPair a b) -> Term s (PBuiltinPair a b) -> Term s PBool Source #

PIsData (PBuiltinPair (PAsData a) (PAsData b)) Source # 
Instance details

Defined in Plutarch.Internal.IsData

Methods

pfromDataImpl :: forall (s :: S). Term s (PAsData (PBuiltinPair (PAsData a) (PAsData b))) -> Term s (PBuiltinPair (PAsData a) (PAsData b)) Source #

pdataImpl :: forall (s :: S). Term s (PBuiltinPair (PAsData a) (PAsData b)) -> Term s PData Source #

PIsData (PBuiltinPair PData PData) Source # 
Instance details

Defined in Plutarch.Internal.IsData

PIsData (PBuiltinPair PInteger (PBuiltinList PData)) Source # 
Instance details

Defined in Plutarch.Internal.IsData

(PLiftable a, Includes DefaultUni (PlutusRepr a), PLiftable b, Includes DefaultUni (PlutusRepr b)) => PLiftable (PBuiltinPair a b) Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Internal.Lift

Associated Types

type AsHaskell (PBuiltinPair a b) Source #

type PlutusRepr (PBuiltinPair a b) Source #

PlutusType (PBuiltinPair a b) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

Methods

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

pmatch' :: forall (s :: S) (b0 :: PType). Term s (PInner (PBuiltinPair a b)) -> (PBuiltinPair a b s -> Term s b0) -> Term s b0 Source #

(PShow a, PShow b) => PShow (PBuiltinPair a b) Source # 
Instance details

Defined in Plutarch.Internal.Show

Methods

pshow' :: forall (s :: S). Bool -> Term s (PBuiltinPair a b) -> Term s PString Source #

type PTryFromExcess PData (PAsData (PBuiltinPair a b)) Source # 
Instance details

Defined in Plutarch.Internal.TryFrom

type AsHaskell (PBuiltinPair a b) Source # 
Instance details

Defined in Plutarch.Internal.Lift

type PlutusRepr (PBuiltinPair a b) Source # 
Instance details

Defined in Plutarch.Internal.Lift

type PContravariant' (PBuiltinPair a b) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PCovariant' (PBuiltinPair a b) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PInner (PBuiltinPair a b) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PVariant' (PBuiltinPair a b) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

ppairDataBuiltin :: Term s (PAsData a :--> (PAsData b :--> PBuiltinPair (PAsData a) (PAsData b))) Source #

Construct a builtin pair of PData elements.

Uses PAsData to preserve more information about the underlying PData.

data PBuiltinList (a :: S -> Type) (s :: S) Source #

Plutus BuiltinList

Constructors

PCons (Term s a) (Term s (PBuiltinList a)) 
PNil 

Instances

Instances details
PListLike PBuiltinList Source # 
Instance details

Defined in Plutarch.Internal.ListLike

Associated Types

type PElemConstraint PBuiltinList a Source #

Methods

pelimList :: forall (a :: S -> Type) (s :: S) (r :: PType). PElemConstraint PBuiltinList a => (Term s a -> Term s (PBuiltinList a) -> Term s r) -> Term s r -> Term s (PBuiltinList a) -> Term s r Source #

pcons :: forall (a :: S -> Type) (s :: S). PElemConstraint PBuiltinList a => Term s (a :--> (PBuiltinList a :--> PBuiltinList a)) Source #

pnil :: forall (a :: S -> Type) (s :: S). PElemConstraint PBuiltinList a => Term s (PBuiltinList a) Source #

phead :: forall (a :: S -> Type) (s :: S). PElemConstraint PBuiltinList a => Term s (PBuiltinList a :--> a) Source #

ptail :: forall (a :: S -> Type) (s :: S). PElemConstraint PBuiltinList a => Term s (PBuiltinList a :--> PBuiltinList a) Source #

pnull :: forall (a :: S -> Type) (s :: S). PElemConstraint PBuiltinList a => Term s (PBuiltinList a :--> PBool) Source #

(PTryFrom PData (PAsData a), PIsData a) => PTryFrom PData (PAsData (PBuiltinList (PAsData a))) Source #

Recover a `PBuiltinList (PAsData a)`

Instance details

Defined in Plutarch.Internal.TryFrom

Associated Types

type PTryFromExcess PData (PAsData (PBuiltinList (PAsData a))) :: PType Source #

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PAsData (PBuiltinList (PAsData a))), Reduce (PTryFromExcess PData (PAsData (PBuiltinList (PAsData a))) s)) -> Term s r) -> Term s r Source #

PTryFrom PData (PAsData (PBuiltinList PData)) Source #

This verifies a list to be indeed a list but doesn't recover the inner data use this instance instead of the one for `PData (PAsData (PBuiltinList (PAsData a)))` as this is O(1) instead of O(n)

Instance details

Defined in Plutarch.Internal.TryFrom

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PAsData (PBuiltinList PData)), Reduce (PTryFromExcess PData (PAsData (PBuiltinList PData)) s)) -> Term s r) -> Term s r Source #

Fc (F a) a => PEq (PBuiltinList a) Source # 
Instance details

Defined in Plutarch.Internal.Eq

Methods

(#==) :: forall (s :: S). Term s (PBuiltinList a) -> Term s (PBuiltinList a) -> Term s PBool Source #

(PInnermostIsData ('Just "PBuiltinList only implements PIsData when inner most type of its elements are PData") a, PSubtype PData a) => PIsData (PBuiltinList a) Source # 
Instance details

Defined in Plutarch.Internal.IsData

Methods

pfromDataImpl :: forall (s :: S). Term s (PAsData (PBuiltinList a)) -> Term s (PBuiltinList a) Source #

pdataImpl :: forall (s :: S). Term s (PBuiltinList a) -> Term s PData Source #

(PLiftable a, Includes DefaultUni (PlutusRepr a)) => PLiftable (PBuiltinList a) Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Internal.Lift

Associated Types

type AsHaskell (PBuiltinList a) Source #

type PlutusRepr (PBuiltinList a) Source #

Contains DefaultUni (PlutusRepr a) => PlutusType (PBuiltinList a) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

Methods

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

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

(PShow a, Contains DefaultUni (PlutusRepr a)) => PShow (PBuiltinList a) Source # 
Instance details

Defined in Plutarch.Internal.Show

Methods

pshow' :: forall (s :: S). Bool -> Term s (PBuiltinList a) -> Term s PString Source #

PIsData (PBuiltinPair PInteger (PBuiltinList PData)) Source # 
Instance details

Defined in Plutarch.Internal.IsData

type PElemConstraint PBuiltinList a Source # 
Instance details

Defined in Plutarch.Internal.ListLike

type PElemConstraint PBuiltinList a = Contains DefaultUni (PlutusRepr a)
type PTryFromExcess PData (PAsData (PBuiltinList (PAsData a))) Source # 
Instance details

Defined in Plutarch.Internal.TryFrom

type PTryFromExcess PData (PAsData (PBuiltinList PData)) Source # 
Instance details

Defined in Plutarch.Internal.TryFrom

type AsHaskell (PBuiltinList a) Source # 
Instance details

Defined in Plutarch.Internal.Lift

type PlutusRepr (PBuiltinList a) Source # 
Instance details

Defined in Plutarch.Internal.Lift

type PContravariant' (PBuiltinList a) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PCovariant' (PBuiltinList a) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PInner (PBuiltinList a) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PVariant' (PBuiltinList a) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType