plutarch
Safe HaskellNone
LanguageGHC2021

Plutarch.Internal.PlutusType

Synopsis

Documentation

class PlutusType (a :: S -> Type) Source #

Instances

Instances details
PlutusType PBitString Source # 
Instance details

Defined in Plutarch.BitString

Associated Types

type PInner PBitString

Since: plutarch-1.10.0

Instance details

Defined in Plutarch.BitString

Methods

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

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

PlutusType PBuiltinBLS12_381_G1_Element Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

PlutusType PBuiltinBLS12_381_G2_Element Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

PlutusType PBuiltinBLS12_381_MlResult Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

PlutusType PBool Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Internal.PlutusType

Associated Types

type PInner PBool 
Instance details

Defined in Plutarch.Internal.PlutusType

Methods

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

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

PlutusType PByte Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

Associated Types

type PInner PByte

Since: plutarch-1.10.0

Instance details

Defined in Plutarch.Internal.PlutusType

Methods

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

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

PlutusType PByteString Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

Associated Types

type PInner PByteString

Since: plutarch-1.10.0

Instance details

Defined in Plutarch.Internal.PlutusType

Methods

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

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

PlutusType PEndianness Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

Associated Types

type PInner PEndianness

Since: plutarch-1.10.0

Instance details

Defined in Plutarch.Internal.PlutusType

Methods

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

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

PlutusType PLogicOpSemantics Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

Associated Types

type PInner PLogicOpSemantics

Since: plutarch-1.10.0

Instance details

Defined in Plutarch.Internal.PlutusType

Methods

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

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

PlutusType PData Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

Associated Types

type PInner PData 
Instance details

Defined in Plutarch.Internal.PlutusType

Methods

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

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

PlutusType PInteger Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

Associated Types

type PInner PInteger 
Instance details

Defined in Plutarch.Internal.PlutusType

Methods

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

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

PlutusType POpaque Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

Associated Types

type PInner POpaque 
Instance details

Defined in Plutarch.Internal.PlutusType

Methods

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

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

PlutusType PString Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

Associated Types

type PInner PString

Since: plutarch-1.10.0

Instance details

Defined in Plutarch.Internal.PlutusType

Methods

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

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

PlutusType PUnit Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

Associated Types

type PInner PUnit 
Instance details

Defined in Plutarch.Internal.PlutusType

Methods

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

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

PlutusType PNatural Source # 
Instance details

Defined in Plutarch.Internal.Numeric

Associated Types

type PInner PNatural

Since: plutarch-1.10.0

Instance details

Defined in Plutarch.Internal.Numeric

Methods

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

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

PlutusType PPositive Source # 
Instance details

Defined in Plutarch.Internal.Numeric

Associated Types

type PInner PPositive

Since: plutarch-1.10.0

Instance details

Defined in Plutarch.Internal.Numeric

Methods

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

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

PlutusType PRational Source # 
Instance details

Defined in Plutarch.Rational

Associated Types

type PInner PRational 
Instance details

Defined in Plutarch.Rational

Methods

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

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

PlutusType (PPullArray a) Source #

Since: 1.13.0

Instance details

Defined in Plutarch.Array

Associated Types

type PInner (PPullArray a) 
Instance details

Defined in Plutarch.Array

Methods

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

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

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 #

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

Defined in Plutarch.Internal.PlutusType

Associated Types

type PInner (PAsData a) 
Instance details

Defined in Plutarch.Internal.PlutusType

type PInner (PAsData a) = PData

Methods

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

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

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

Defined in Plutarch.Internal.PlutusType

Associated Types

type PInner (PBuiltinList a) 
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 :: S -> Type). Term s (PInner (PBuiltinList a)) -> (PBuiltinList a s -> Term s b) -> Term s b Source #

SListI l => PlutusType (PDataRecord l) Source # 
Instance details

Defined in Plutarch.DataRepr.Internal

Associated Types

type PInner (PDataRecord l) 
Instance details

Defined in Plutarch.DataRepr.Internal

Methods

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

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

SListI defs => PlutusType (PDataSum defs) Source # 
Instance details

Defined in Plutarch.DataRepr.Internal

Associated Types

type PInner (PDataSum defs) 
Instance details

Defined in Plutarch.DataRepr.Internal

type PInner (PDataSum defs) = PData

Methods

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

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

PlutusType a => PlutusType (Don'tValidate a) Source #

Since: 1.12.0

Instance details

Defined in Plutarch.Internal.Parse

Associated Types

type PInner (Don'tValidate a) 
Instance details

Defined in Plutarch.Internal.Parse

Methods

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

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

PlutusType (DeriveFakePlutusType a) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

Associated Types

type PInner (DeriveFakePlutusType a) 
Instance details

Defined in Plutarch.Internal.PlutusType

type PInner (DeriveFakePlutusType a) = TypeError ('ShowType a ':<>: 'Text " derived PlutusType with DeriveFakePlutusType. This type is not meant to be used as PlutusType.") :: S -> Type

Methods

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

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

(pt ~ UnTermSingle (Head (Head (Code (a (Any :: S))))), forall (s :: S). H s a pt) => PlutusType (DeriveNewtypePlutusType a) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

Associated Types

type PInner (DeriveNewtypePlutusType a) 
Instance details

Defined in Plutarch.Internal.PlutusType

Methods

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

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

PlutusType (PFix f) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

Associated Types

type PInner (PFix f) 
Instance details

Defined in Plutarch.Internal.PlutusType

type PInner (PFix f) = f (PFix f)

Methods

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

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

PlutusType (PAnd a) Source # 
Instance details

Defined in Plutarch.Internal.Semigroup

Associated Types

type PInner (PAnd a)

Since: plutarch-1.10.0

Instance details

Defined in Plutarch.Internal.Semigroup

Methods

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

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

PlutusType (POr a) Source # 
Instance details

Defined in Plutarch.Internal.Semigroup

Associated Types

type PInner (POr a)

Since: plutarch-1.10.0

Instance details

Defined in Plutarch.Internal.Semigroup

Methods

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

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

PlutusType (PXor a) Source # 
Instance details

Defined in Plutarch.Internal.Semigroup

Associated Types

type PInner (PXor a)

Since: plutarch-1.10.0

Instance details

Defined in Plutarch.Internal.Semigroup

Methods

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

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

PlutusType (PList a) Source # 
Instance details

Defined in Plutarch.List

Associated Types

type PInner (PList a)

Since: plutarch-1.10.0

Instance details

Defined in Plutarch.List

Methods

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

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

PlutusType (PMaybe a) Source # 
Instance details

Defined in Plutarch.Maybe

Associated Types

type PInner (PMaybe a)

Since: plutarch-1.10.0

Instance details

Defined in Plutarch.Maybe

Methods

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

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

(Generic (a (Any :: S)), '[struct'] ~ Code (a (Any :: S)), struct ~ UnTermRec struct', All PInnermostIsDataDataRepr struct, SListI struct, forall (s :: S). StructSameRepr s a '[struct], RecTypePrettyError (Code (a (Any :: S)))) => PlutusType (DeriveAsDataRec a) Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Repr.Data

Associated Types

type PInner (DeriveAsDataRec a) 
Instance details

Defined in Plutarch.Repr.Data

type PInner (DeriveAsDataRec a) = PDataRec (UnTermRec (Head (Code (a (Any :: S)))))

Methods

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

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

(Generic (a (Any :: S)), struct ~ UnTermStruct (a (Any :: S)), All2 PInnermostIsDataDataRepr struct, SListI2 struct, forall (s :: S). StructSameRepr s a struct) => PlutusType (DeriveAsDataStruct a) Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Repr.Data

Associated Types

type PInner (DeriveAsDataStruct a) 
Instance details

Defined in Plutarch.Repr.Data

Methods

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

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

(SListI struct, All PInnermostIsDataDataRepr struct) => PlutusType (PDataRec struct) Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Repr.Data

Associated Types

type PInner (PDataRec struct) 
Instance details

Defined in Plutarch.Repr.Data

Methods

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

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

(SListI2 struct, All2 PInnermostIsDataDataRepr struct) => PlutusType (PDataStruct struct) Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Repr.Data

Associated Types

type PInner (PDataStruct struct) 
Instance details

Defined in Plutarch.Repr.Data

type PInner (PDataStruct struct) = PData

Methods

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

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

(Generic (a (Any :: S)), '[struct'] ~ Code (a (Any :: S)), struct ~ UnTermRec struct', SListI struct, forall (s :: S). StructSameRepr s a '[struct], RecTypePrettyError (Code (a (Any :: S)))) => PlutusType (DeriveAsSOPRec a) Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Repr.SOP

Associated Types

type PInner (DeriveAsSOPRec a) 
Instance details

Defined in Plutarch.Repr.SOP

type PInner (DeriveAsSOPRec a) = PSOPRec (UnTermRec (Head (Code (a (Any :: S)))))

Methods

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

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

(Generic (a (Any :: S)), struct ~ UnTermStruct (a (Any :: S)), SListI2 struct, forall (s :: S). StructSameRepr s a struct, PSOPStructConstraint struct) => PlutusType (DeriveAsSOPStruct a) Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Repr.SOP

Associated Types

type PInner (DeriveAsSOPStruct a) 
Instance details

Defined in Plutarch.Repr.SOP

Methods

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

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

SListI struct => PlutusType (PSOPRec struct) Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Repr.SOP

Associated Types

type PInner (PSOPRec struct) 
Instance details

Defined in Plutarch.Repr.SOP

type PInner (PSOPRec struct) = POpaque

Methods

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

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

(SListI2 struct, PSOPStructConstraint struct) => PlutusType (PSOPStruct struct) Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Repr.SOP

Associated Types

type PInner (PSOPStruct struct) 
Instance details

Defined in Plutarch.Repr.SOP

type PInner (PSOPStruct struct) = POpaque

Methods

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

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

(Generic (a (Any :: S)), '[struct'] ~ Code (a (Any :: S)), struct ~ UnTermRec struct', SListI struct, forall (s :: S). StructSameRepr s a '[struct], RecTypePrettyError (Code (a (Any :: S)))) => PlutusType (DeriveAsScottRec a) Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Repr.Scott

Associated Types

type PInner (DeriveAsScottRec a) 
Instance details

Defined in Plutarch.Repr.Scott

type PInner (DeriveAsScottRec a) = PScottRec (UnTermRec (Head (Code (a (Any :: S)))))

Methods

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

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

(Generic (a (Any :: S)), struct ~ UnTermStruct (a (Any :: S)), SListI2 struct, forall (s :: S). StructSameRepr s a struct, PScottStructConstraint struct) => PlutusType (DeriveAsScottStruct a) Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Repr.Scott

Associated Types

type PInner (DeriveAsScottStruct a) 
Instance details

Defined in Plutarch.Repr.Scott

Methods

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

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

SListI struct => PlutusType (PScottRec struct) Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Repr.Scott

Associated Types

type PInner (PScottRec struct) 
Instance details

Defined in Plutarch.Repr.Scott

type PInner (PScottRec struct) = PForall (PScottRecInner struct)

Methods

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

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

(SListI2 struct, PScottStructConstraint struct) => PlutusType (PScottStruct struct) Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Repr.Scott

Associated Types

type PInner (PScottStruct struct) 
Instance details

Defined in Plutarch.Repr.Scott

type PInner (PScottStruct struct) = PForall (PScottStructInner struct)

Methods

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

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

(forall (s :: S). TagTypeConstraints s a struct) => PlutusType (DeriveAsTag a) Source #

This derives tag-only PlutusType automatically. Resulted instances will use PInteger as underlying type, making this much more efficient than using regular DataScottSOP based encoding. As name suggests, types with no-argument constructors can use this.

Example: @@ data PFoo s = A | B | C | D | E deriving stock (GHC.Generic, Show) deriving anyclass (PEq, PIsData) deriving (PlutusType, PLiftable) via DeriveAsTag PFoo

instance SOP.Generic (PFoo s) @@

Since: 1.10.0

Instance details

Defined in Plutarch.Repr.Tag

Associated Types

type PInner (DeriveAsTag a) 
Instance details

Defined in Plutarch.Repr.Tag

Methods

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

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

PlutusType (PTag struct) Source # 
Instance details

Defined in Plutarch.Repr.Tag

Associated Types

type PInner (PTag struct)

Since: plutarch-1.10.0

Instance details

Defined in Plutarch.Repr.Tag

type PInner (PTag struct) = PInner (DeriveNewtypePlutusType (PTag struct))

Methods

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

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

PlutusType (PBuiltinPair a b) Source #

Important note

Due to some weirdnesses regarding builtins, PBuiltinPairs cannot be constructed from anything that's not already Data-encoded, but as builtin pairs are, well, built-in, we can lift, and pmatch, them just fine. Thus, you should not use pcon for PBuiltinPair.

Since: 1.12.0

Instance details

Defined in Plutarch.Internal.PlutusType

Associated Types

type PInner (PBuiltinPair a b) 
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 :: S -> Type). Term s (PInner (PBuiltinPair a b)) -> (PBuiltinPair a b s -> Term s b0) -> Term s b0 Source #

PlutusType (PEither a b) Source # 
Instance details

Defined in Plutarch.Either

Associated Types

type PInner (PEither a b)

Since: plutarch-1.10.0

Instance details

Defined in Plutarch.Either

Methods

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

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

PlutusType (PEitherData a b) Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Either

Associated Types

type PInner (PEitherData a b) 
Instance details

Defined in Plutarch.Either

type PInner (PEitherData a b) = PData

Methods

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

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

PlutusType (DeriveBuiltinPLiftable a h) Source # 
Instance details

Defined in Plutarch.Internal.Lift

Associated Types

type PInner (DeriveBuiltinPLiftable a h)

Since: plutarch-1.10.0

Instance details

Defined in Plutarch.Internal.Lift

Methods

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

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

PlutusType (DeriveDataPLiftable a h) Source # 
Instance details

Defined in Plutarch.Internal.Lift

Associated Types

type PInner (DeriveDataPLiftable a h)

Since: plutarch-1.10.0

Instance details

Defined in Plutarch.Internal.Lift

Methods

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

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

PlutusType (DeriveNewtypePLiftable wrapper h) Source # 
Instance details

Defined in Plutarch.Internal.Lift

Associated Types

type PInner (DeriveNewtypePLiftable wrapper h)

Since: plutarch-1.10.0

Instance details

Defined in Plutarch.Internal.Lift

Methods

pcon' :: forall (s :: S). DeriveNewtypePLiftable wrapper h s -> Term s (PInner (DeriveNewtypePLiftable wrapper h)) Source #

pmatch' :: forall (s :: S) (b :: S -> Type). Term s (PInner (DeriveNewtypePLiftable wrapper h)) -> (DeriveNewtypePLiftable wrapper h s -> Term s b) -> Term s b Source #

PlutusType (PForall f) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

Associated Types

type PInner (PForall f) 
Instance details

Defined in Plutarch.Internal.PlutusType

type PInner (PForall f) = PForall f

Methods

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

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

PlutusType (PSome f) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

Associated Types

type PInner (PSome f) 
Instance details

Defined in Plutarch.Internal.PlutusType

type PInner (PSome f) = PSome f

Methods

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

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

PlutusType (PScottEncoded a r) Source # 
Instance details

Defined in Plutarch.Internal.ScottEncoding

Associated Types

type PInner (PScottEncoded a r) 
Instance details

Defined in Plutarch.Internal.ScottEncoding

Methods

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

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

PlutusType (a :--> b) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

Associated Types

type PInner (a :--> b) 
Instance details

Defined in Plutarch.Internal.PlutusType

type PInner (a :--> b) = a :--> b

Methods

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

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

PlutusType (PPair a b) Source # 
Instance details

Defined in Plutarch.Pair

Associated Types

type PInner (PPair a b)

Since: plutarch-1.10.0

Instance details

Defined in Plutarch.Pair

Methods

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

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

PlutusType (DerivePLiftableAsRepr wrapper h) Source # 
Instance details

Defined in Plutarch.Repr.Derive

Associated Types

type PInner (DerivePLiftableAsRepr wrapper h) 
Instance details

Defined in Plutarch.Repr.Derive

Methods

pcon' :: forall (s :: S). DerivePLiftableAsRepr wrapper h s -> Term s (PInner (DerivePLiftableAsRepr wrapper h)) Source #

pmatch' :: forall (s :: S) (b :: S -> Type). Term s (PInner (DerivePLiftableAsRepr wrapper h)) -> (DerivePLiftableAsRepr wrapper h s -> Term s b) -> Term s b Source #

type PInnermost (a :: S -> Type) = PInnermost' (PInner a) a Source #

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

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

pmatch :: forall a (s :: S) (b :: S -> Type). PlutusType a => Term s a -> (a s -> Term s b) -> Term s b Source #

Pattern match over Plutarch Terms via a Haskell datatype

pcon :: forall a (s :: S). PlutusType a => a s -> Term s a Source #

Construct a Plutarch Term via a Haskell datatype

type family PInner (a :: S -> Type) :: S -> Type Source #

Instances

Instances details
type PInner PBitString Source #

Since: 1.10.0

Instance details

Defined in Plutarch.BitString

type PInner PBuiltinBLS12_381_G1_Element Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Internal.PlutusType

type PInner PBuiltinBLS12_381_G2_Element Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Internal.PlutusType

type PInner PBuiltinBLS12_381_MlResult Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Internal.PlutusType

type PInner PBool Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PInner PByte Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Internal.PlutusType

type PInner PByteString Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Internal.PlutusType

type PInner PEndianness Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Internal.PlutusType

type PInner PLogicOpSemantics Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Internal.PlutusType

type PInner PData Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PInner PInteger Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PInner POpaque Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PInner PString Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Internal.PlutusType

type PInner PUnit Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PInner PNatural Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Internal.Numeric

type PInner PPositive Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Internal.Numeric

type PInner PRational Source # 
Instance details

Defined in Plutarch.Rational

type PInner (PPullArray a) Source # 
Instance details

Defined in Plutarch.Array

type PInner (PArray a) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PInner (PArray a) = PArray a
type PInner (PAsData a) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

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

Defined in Plutarch.Internal.PlutusType

type PInner (PDataRecord l) Source # 
Instance details

Defined in Plutarch.DataRepr.Internal

type PInner (PDataSum defs) Source # 
Instance details

Defined in Plutarch.DataRepr.Internal

type PInner (PDataSum defs) = PData
type PInner (Don'tValidate a) Source # 
Instance details

Defined in Plutarch.Internal.Parse

type PInner (DeriveFakePlutusType a) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PInner (DeriveFakePlutusType a) = TypeError ('ShowType a ':<>: 'Text " derived PlutusType with DeriveFakePlutusType. This type is not meant to be used as PlutusType.") :: S -> Type
type PInner (DeriveNewtypePlutusType a) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PInner (PFix f) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PInner (PFix f) = f (PFix f)
type PInner (PAnd a) Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Internal.Semigroup

type PInner (POr a) Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Internal.Semigroup

type PInner (PXor a) Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Internal.Semigroup

type PInner (PList a) Source #

Since: 1.10.0

Instance details

Defined in Plutarch.List

type PInner (PMaybe a) Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Maybe

type PInner (DeriveAsDataRec a) Source # 
Instance details

Defined in Plutarch.Repr.Data

type PInner (DeriveAsDataRec a) = PDataRec (UnTermRec (Head (Code (a (Any :: S)))))
type PInner (DeriveAsDataStruct a) Source # 
Instance details

Defined in Plutarch.Repr.Data

type PInner (PDataRec struct) Source # 
Instance details

Defined in Plutarch.Repr.Data

type PInner (PDataStruct struct) Source # 
Instance details

Defined in Plutarch.Repr.Data

type PInner (PDataStruct struct) = PData
type PInner (DeriveAsSOPRec a) Source # 
Instance details

Defined in Plutarch.Repr.SOP

type PInner (DeriveAsSOPRec a) = PSOPRec (UnTermRec (Head (Code (a (Any :: S)))))
type PInner (DeriveAsSOPStruct a) Source # 
Instance details

Defined in Plutarch.Repr.SOP

type PInner (PSOPRec struct) Source # 
Instance details

Defined in Plutarch.Repr.SOP

type PInner (PSOPRec struct) = POpaque
type PInner (PSOPStruct struct) Source # 
Instance details

Defined in Plutarch.Repr.SOP

type PInner (PSOPStruct struct) = POpaque
type PInner (DeriveAsScottRec a) Source # 
Instance details

Defined in Plutarch.Repr.Scott

type PInner (DeriveAsScottRec a) = PScottRec (UnTermRec (Head (Code (a (Any :: S)))))
type PInner (DeriveAsScottStruct a) Source # 
Instance details

Defined in Plutarch.Repr.Scott

type PInner (PScottRec struct) Source # 
Instance details

Defined in Plutarch.Repr.Scott

type PInner (PScottRec struct) = PForall (PScottRecInner struct)
type PInner (PScottStruct struct) Source # 
Instance details

Defined in Plutarch.Repr.Scott

type PInner (PScottStruct struct) = PForall (PScottStructInner struct)
type PInner (DeriveAsTag a) Source # 
Instance details

Defined in Plutarch.Repr.Tag

type PInner (PTag struct) Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Repr.Tag

type PInner (PTag struct) = PInner (DeriveNewtypePlutusType (PTag struct))
type PInner (PBuiltinPair a b) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PInner (PEither a b) Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Either

type PInner (PEitherData a b) Source # 
Instance details

Defined in Plutarch.Either

type PInner (PEitherData a b) = PData
type PInner (DeriveBuiltinPLiftable a h) Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Internal.Lift

type PInner (DeriveDataPLiftable a h) Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Internal.Lift

type PInner (DeriveNewtypePLiftable wrapper h) Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Internal.Lift

type PInner (PForall f) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PInner (PForall f) = PForall f
type PInner (PSome f) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PInner (PSome f) = PSome f
type PInner (PScottEncoded a r) Source # 
Instance details

Defined in Plutarch.Internal.ScottEncoding

type PInner (a :--> b) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PInner (a :--> b) = a :--> b
type PInner (PPair a b) Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Pair

type PInner (DerivePLiftableAsRepr wrapper h) Source # 
Instance details

Defined in Plutarch.Repr.Derive

class PlutusTypeStrat strategy Source #

Deprecated: Use the new mechanisms instead

Minimal complete definition

derivedPCon, derivedPMatch

Instances

Instances details
PlutusTypeStrat PlutusTypeData Source # 
Instance details

Defined in Plutarch.DataRepr.Internal

Methods

derivedPCon :: forall a (s :: S). (DerivePlutusType a, DPTStrat a ~ PlutusTypeData) => a s -> Term s (DerivedPInner PlutusTypeData a) Source #

derivedPMatch :: forall a (s :: S) (b :: S -> Type). (DerivePlutusType a, DPTStrat a ~ PlutusTypeData) => Term s (DerivedPInner PlutusTypeData a) -> (a s -> Term s b) -> Term s b Source #

PlutusTypeStrat PlutusTypeNewtype Source # 
Instance details

Defined in Plutarch.Internal.Newtype

Methods

derivedPCon :: forall a (s :: S). (DerivePlutusType a, DPTStrat a ~ PlutusTypeNewtype) => a s -> Term s (DerivedPInner PlutusTypeNewtype a) Source #

derivedPMatch :: forall a (s :: S) (b :: S -> Type). (DerivePlutusType a, DPTStrat a ~ PlutusTypeNewtype) => Term s (DerivedPInner PlutusTypeNewtype a) -> (a s -> Term s b) -> Term s b Source #

PlutusTypeStrat PlutusTypeScott Source # 
Instance details

Defined in Plutarch.Internal.ScottEncoding

Methods

derivedPCon :: forall a (s :: S). (DerivePlutusType a, DPTStrat a ~ PlutusTypeScott) => a s -> Term s (DerivedPInner PlutusTypeScott a) Source #

derivedPMatch :: forall a (s :: S) (b :: S -> Type). (DerivePlutusType a, DPTStrat a ~ PlutusTypeScott) => Term s (DerivedPInner PlutusTypeScott a) -> (a s -> Term s b) -> Term s b Source #

class (PInner a ~ DerivedPInner (DPTStrat a) a, PlutusTypeStrat (DPTStrat a), PlutusTypeStratConstraint (DPTStrat a) a, PlutusType a) => DerivePlutusType (a :: S -> Type) Source #

Deprecated: Use the new mechanisms instead

type family DPTStrat (a :: S -> Type) Source #

type family DerivedPInner strategy (a :: S -> Type) :: S -> Type Source #

derivedPCon :: forall a (s :: S). (PlutusTypeStrat strategy, DerivePlutusType a, DPTStrat a ~ strategy) => a s -> Term s (DerivedPInner strategy a) Source #

derivedPMatch :: forall a (s :: S) (b :: S -> Type). (PlutusTypeStrat strategy, DerivePlutusType a, DPTStrat a ~ strategy) => Term s (DerivedPInner strategy a) -> (a s -> Term s b) -> Term s b Source #

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

Since: 1.10.0

Constructors

DeriveNewtypePlutusType 

Fields

Instances

Instances details
(pt ~ UnTermSingle (Head (Head (Code (a (Any :: S))))), forall (s :: S). H s a pt) => PlutusType (DeriveNewtypePlutusType a) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

Associated Types

type PInner (DeriveNewtypePlutusType a) 
Instance details

Defined in Plutarch.Internal.PlutusType

Methods

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

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

type PInner (DeriveNewtypePlutusType a) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

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

This is a cursed derivation strategy that will give you PlutusType with no questions asked. This is occasionally helpful for deriving PlutusType for another derivation strategy wrapper whose target instance requires PlutusType as superclass.

See PLiftable

Constructors

DeriveFakePlutusType (a s) 

Instances

Instances details
PlutusType (DeriveFakePlutusType a) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

Associated Types

type PInner (DeriveFakePlutusType a) 
Instance details

Defined in Plutarch.Internal.PlutusType

type PInner (DeriveFakePlutusType a) = TypeError ('ShowType a ':<>: 'Text " derived PlutusType with DeriveFakePlutusType. This type is not meant to be used as PlutusType.") :: S -> Type

Methods

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

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

type PInner (DeriveFakePlutusType a) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PInner (DeriveFakePlutusType a) = TypeError ('ShowType a ':<>: 'Text " derived PlutusType with DeriveFakePlutusType. This type is not meant to be used as PlutusType.") :: S -> Type