plutarch-1.3.0
Safe HaskellSafe-Inferred
LanguageGHC2021

Plutarch

Synopsis

Documentation

data ((a :: PType) :--> (b :: PType)) (s :: S) infixr 0 Source #

Instances

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

Defined in Plutarch.Internal.PlutusType

Associated Types

type PInner (a :--> b) :: PType Source #

type PCovariant' (a :--> b) Source #

type PContravariant' (a :--> b) Source #

type PVariant' (a :--> b) Source #

Methods

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

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

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

Defined in Plutarch.Internal.PlutusType

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

Defined in Plutarch.Internal.PlutusType

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

Defined in Plutarch.Internal.PlutusType

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

Defined in Plutarch.Internal.PlutusType

type PVariant' (a :--> b) = (PVariant' a, PVariant' b)

type ClosedTerm (a :: PType) = forall (s :: S). Term s a Source #

  • Closed* terms with no free variables.

compile :: Config -> ClosedTerm a -> Either Text Script Source #

Compile a (closed) Plutus Term to a usable script

newtype Script Source #

Instances

Instances details
Generic Script Source # 
Instance details

Defined in Plutarch.Script

Associated Types

type Rep Script :: Type -> Type Source #

Show Script Source # 
Instance details

Defined in Plutarch.Script

Eq Script Source # 
Instance details

Defined in Plutarch.Script

type Rep Script Source # 
Instance details

Defined in Plutarch.Script

type Rep Script = D1 ('MetaData "Script" "Plutarch.Script" "plutarch-1.3.0-287WdR4V4qr3NTh5i3Je4I" 'True) (C1 ('MetaCons "Script" 'PrefixI 'True) (S1 ('MetaSel ('Just "unScript") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Program DeBruijn DefaultUni DefaultFun ()))))

papp :: HasCallStack => Term s (a :--> b) -> Term s a -> Term s b Source #

Lambda Application.

pdelay :: Term s a -> Term s (PDelayed a) Source #

Plutus 'delay', used for laziness.

data PDelayed (a :: PType) (s :: S) Source #

perror :: Term s a Source #

Plutus 'error'.

When using this explicitly, it should be ensured that the containing term is delayed, avoiding premature evaluation.

pforce :: Term s (PDelayed a) -> Term s a Source #

Plutus 'force', used to force evaluation of PDelayed terms.

plet :: Term s a -> (Term s a -> Term s b) -> Term s b Source #

Let bindings.

This is appoximately a shorthand for a lambda and application:

plet v f == papp (plam f) v

But sufficiently small terms in WHNF may be inlined for efficiency.

data Term (s :: S) (a :: PType) Source #

Instances

Instances details
(IndexLabel name as ~ a, ElemOf name a as, Term s (PAsData b) ~ a, PFromDataable b c) => HasField (name :: Symbol) (HRec as) (Term s c) Source # 
Instance details

Defined in Plutarch.DataRepr.Internal.HList

Methods

getField :: HRec as -> Term s c Source #

IsString (Term s PString) Source # 
Instance details

Defined in Plutarch.String

(POrd k, PIsData k, PIsData v, Semigroup (Term s v)) => Monoid (Term s (PMap 'Sorted k v)) Source # 
Instance details

Defined in Plutarch.Api.V1.AssocMap

Methods

mempty :: Term s (PMap 'Sorted k v) Source #

mappend :: Term s (PMap 'Sorted k v) -> Term s (PMap 'Sorted k v) -> Term s (PMap 'Sorted k v) Source #

mconcat :: [Term s (PMap 'Sorted k v)] -> Term s (PMap 'Sorted k v) Source #

Semigroup (Term s (PValue 'Sorted normalization)) => Monoid (Term s (PValue 'Sorted normalization)) Source # 
Instance details

Defined in Plutarch.Api.V1.Value

Methods

mempty :: Term s (PValue 'Sorted normalization) Source #

mappend :: Term s (PValue 'Sorted normalization) -> Term s (PValue 'Sorted normalization) -> Term s (PValue 'Sorted normalization) Source #

mconcat :: [Term s (PValue 'Sorted normalization)] -> Term s (PValue 'Sorted normalization) Source #

Monoid (Term s PByteString) Source # 
Instance details

Defined in Plutarch.ByteString

Monoid (Term s PString) Source # 
Instance details

Defined in Plutarch.String

Monoid (Term s (PUnit :: S -> Type)) Source # 
Instance details

Defined in Plutarch.Unit

(POrd k, PIsData k, PIsData v, Semigroup (Term s v)) => Semigroup (Term s (PMap 'Sorted k v)) Source # 
Instance details

Defined in Plutarch.Api.V1.AssocMap

Methods

(<>) :: Term s (PMap 'Sorted k v) -> Term s (PMap 'Sorted k v) -> Term s (PMap 'Sorted k v) Source #

sconcat :: NonEmpty (Term s (PMap 'Sorted k v)) -> Term s (PMap 'Sorted k v) Source #

stimes :: Integral b => b -> Term s (PMap 'Sorted k v) -> Term s (PMap 'Sorted k v) Source #

Semigroup (Term s (PValue 'Sorted 'NoGuarantees)) Source # 
Instance details

Defined in Plutarch.Api.V1.Value

Semigroup (Term s (PValue 'Sorted 'NonZero)) Source # 
Instance details

Defined in Plutarch.Api.V1.Value

Semigroup (Term s (PValue 'Sorted 'Positive)) Source # 
Instance details

Defined in Plutarch.Api.V1.Value

Semigroup (Term s PByteString) Source # 
Instance details

Defined in Plutarch.ByteString

Semigroup (Term s PString) Source # 
Instance details

Defined in Plutarch.String

Semigroup (Term s (PUnit :: S -> Type)) Source # 
Instance details

Defined in Plutarch.Unit

(PIsData k, PIsData v, POrd k) => IsList (Term s (PMap 'Sorted k v)) Source # 
Instance details

Defined in Plutarch.Api.V1.AssocMap

Associated Types

type Item (Term s (PMap 'Sorted k v)) Source #

Methods

fromList :: [Item (Term s (PMap 'Sorted k v))] -> Term s (PMap 'Sorted k v) Source #

fromListN :: Int -> [Item (Term s (PMap 'Sorted k v))] -> Term s (PMap 'Sorted k v) Source #

toList :: Term s (PMap 'Sorted k v) -> [Item (Term s (PMap 'Sorted k v))] Source #

(PIsData k, PIsData v, POrd k) => IsList (Term s (PMap 'Unsorted k v)) Source # 
Instance details

Defined in Plutarch.Api.V1.AssocMap

Associated Types

type Item (Term s (PMap 'Unsorted k v)) Source #

Methods

fromList :: [Item (Term s (PMap 'Unsorted k v))] -> Term s (PMap 'Unsorted k v) Source #

fromListN :: Int -> [Item (Term s (PMap 'Unsorted k v))] -> Term s (PMap 'Unsorted k v) Source #

toList :: Term s (PMap 'Unsorted k v) -> [Item (Term s (PMap 'Unsorted k v))] Source #

PNum a => Num (Term s a) Source # 
Instance details

Defined in Plutarch.Num

Methods

(+) :: Term s a -> Term s a -> Term s a Source #

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

(*) :: Term s a -> Term s a -> Term s a Source #

negate :: Term s a -> Term s a Source #

abs :: Term s a -> Term s a Source #

signum :: Term s a -> Term s a Source #

fromInteger :: Integer -> Term s a Source #

(PNum a, PFractional a) => Fractional (Term s a) Source # 
Instance details

Defined in Plutarch.Rational

Methods

(/) :: Term s a -> Term s a -> Term s a Source #

recip :: Term s a -> Term s a Source #

fromRational :: Rational -> Term s a Source #

(POrd k, PIsData k, PIsData v, Group (Term s v)) => Group (Term s (PMap 'Sorted k v)) Source # 
Instance details

Defined in Plutarch.Api.V1.AssocMap

Methods

inv :: Term s (PMap 'Sorted k v) -> Term s (PMap 'Sorted k v) Source #

Semigroup (Term s (PValue 'Sorted 'NoGuarantees)) => Group (Term s (PValue 'Sorted 'NoGuarantees)) Source # 
Instance details

Defined in Plutarch.Api.V1.Value

Semigroup (Term s (PValue 'Sorted 'NonZero)) => Group (Term s (PValue 'Sorted 'NonZero)) Source # 
Instance details

Defined in Plutarch.Api.V1.Value

(POrd k, PIsData k, PIsData v, Semigroup (Term s v)) => Monoid (Term s (PMap 'Sorted k v)) Source # 
Instance details

Defined in Plutarch.Api.V1.AssocMap

Methods

mempty :: Term s (PMap 'Sorted k v) Source #

Semigroup (Term s (PValue 'Sorted normalization)) => Monoid (Term s (PValue 'Sorted normalization)) Source # 
Instance details

Defined in Plutarch.Api.V1.Value

Methods

mempty :: Term s (PValue 'Sorted normalization) Source #

(POrd k, PIsData k, PIsData v, Semigroup (Term s v)) => Semigroup (Term s (PMap 'Sorted k v)) Source # 
Instance details

Defined in Plutarch.Api.V1.AssocMap

Methods

(<>) :: Term s (PMap 'Sorted k v) -> Term s (PMap 'Sorted k v) -> Term s (PMap 'Sorted k v) Source #

Semigroup (Term s (PValue 'Sorted 'NoGuarantees)) Source # 
Instance details

Defined in Plutarch.Api.V1.Value

Semigroup (Term s (PValue 'Sorted 'NonZero)) Source # 
Instance details

Defined in Plutarch.Api.V1.Value

Semigroup (Term s (PValue 'Sorted 'Positive)) Source # 
Instance details

Defined in Plutarch.Api.V1.Value

type Item (Term s (PMap 'Sorted k v)) Source # 
Instance details

Defined in Plutarch.Api.V1.AssocMap

type Item (Term s (PMap 'Sorted k v)) = (Term s k, Term s v)
type Item (Term s (PMap 'Unsorted k v)) Source # 
Instance details

Defined in Plutarch.Api.V1.AssocMap

type Item (Term s (PMap 'Unsorted k v)) = (Term s k, Term s v)

data S Source #

Instances

Instances details
PEq (PUnit :: S -> Type) Source # 
Instance details

Defined in Plutarch.Unit

Methods

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

POrd (PUnit :: S -> Type) Source # 
Instance details

Defined in Plutarch.Unit

PPartialOrd (PUnit :: S -> Type) Source # 
Instance details

Defined in Plutarch.Unit

Methods

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

(#<) :: forall (s :: S). Term s PUnit -> Term s PUnit -> Term s PBool Source #

PIsData (PUnit :: S -> Type) Source # 
Instance details

Defined in Plutarch.Builtin

Methods

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

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

PlutusType (PUnit :: S -> Type) Source # 
Instance details

Defined in Plutarch.Unit

Methods

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

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

PUnsafeLiftDecl (PUnit :: S -> Type) Source # 
Instance details

Defined in Plutarch.Unit

Associated Types

type PLifted PUnit = (r :: Type) Source #

PShow (PUnit :: S -> Type) Source # 
Instance details

Defined in Plutarch.Unit

Methods

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

Monoid (Term s (PUnit :: S -> Type)) Source # 
Instance details

Defined in Plutarch.Unit

Semigroup (Term s (PUnit :: S -> Type)) Source # 
Instance details

Defined in Plutarch.Unit

type PContravariant' (PUnit :: S -> Type) Source # 
Instance details

Defined in Plutarch.Unit

type PCovariant' (PUnit :: S -> Type) Source # 
Instance details

Defined in Plutarch.Unit

type PCovariant' (PUnit :: S -> Type)
type PInner (PUnit :: S -> Type) Source # 
Instance details

Defined in Plutarch.Unit

type PInner (PUnit :: S -> Type) = PUnit :: S -> Type
type PVariant' (PUnit :: S -> Type) Source # 
Instance details

Defined in Plutarch.Unit

type PVariant' (PUnit :: S -> Type)
type PLifted (PUnit :: S -> Type) Source # 
Instance details

Defined in Plutarch.Unit

type PLifted (PUnit :: S -> Type) = ()

type PType = S -> Type Source #

Shorthand for Plutarch types.

(#$) :: HasCallStack => Term s (a :--> b) -> Term s a -> Term s b infixr 0 Source #

Low precedence infixr synonym of papp, to be used like $, in combination with #. e.g.:

>>> f # x #$ g # y # z
f x (g y z)

(#) :: HasCallStack => Term s (a :--> b) -> Term s a -> Term s b infixl 8 Source #

High precedence infixl synonym of papp, to be used like function juxtaposition. e.g.:

>>> f # x # y
f x y

class PlutusType (a :: PType) Source #

Instances

Instances details
PlutusType PAddress Source # 
Instance details

Defined in Plutarch.Api.V1.Address

Methods

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

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

PlutusType PCredential Source # 
Instance details

Defined in Plutarch.Api.V1.Address

Methods

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

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

PlutusType PStakingCredential Source # 
Instance details

Defined in Plutarch.Api.V1.Address

Methods

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

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

PlutusType PScriptContext Source # 
Instance details

Defined in Plutarch.Api.V1.Contexts

Methods

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

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

PlutusType PScriptPurpose Source # 
Instance details

Defined in Plutarch.Api.V1.Contexts

Methods

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

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

PlutusType PTxInfo Source # 
Instance details

Defined in Plutarch.Api.V1.Contexts

Methods

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

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

PlutusType PPubKeyHash Source # 
Instance details

Defined in Plutarch.Api.V1.Crypto

Methods

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

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

PlutusType PDCert Source # 
Instance details

Defined in Plutarch.Api.V1.DCert

Methods

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

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

PlutusType PDatum Source # 
Instance details

Defined in Plutarch.Api.V1.Scripts

Methods

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

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

PlutusType PDatumHash Source # 
Instance details

Defined in Plutarch.Api.V1.Scripts

Methods

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

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

PlutusType PRedeemer Source # 
Instance details

Defined in Plutarch.Api.V1.Scripts

Methods

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

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

PlutusType PRedeemerHash Source # 
Instance details

Defined in Plutarch.Api.V1.Scripts

Methods

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

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

PlutusType PScriptHash Source # 
Instance details

Defined in Plutarch.Api.V1.Scripts

Methods

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

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

PlutusType PPOSIXTime Source # 
Instance details

Defined in Plutarch.Api.V1.Time

Methods

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

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

PlutusType PTxId Source # 
Instance details

Defined in Plutarch.Api.V1.Tx

Methods

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

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

PlutusType PTxInInfo Source # 
Instance details

Defined in Plutarch.Api.V1.Tx

Methods

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

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

PlutusType PTxOut Source # 
Instance details

Defined in Plutarch.Api.V1.Tx

Methods

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

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

PlutusType PTxOutRef Source # 
Instance details

Defined in Plutarch.Api.V1.Tx

Methods

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

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

PlutusType PCurrencySymbol Source # 
Instance details

Defined in Plutarch.Api.V1.Value

Methods

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

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

PlutusType PTokenName Source # 
Instance details

Defined in Plutarch.Api.V1.Value

Methods

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

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

PlutusType PScriptContext Source # 
Instance details

Defined in Plutarch.Api.V2.Contexts

Methods

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

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

PlutusType PTxInfo Source # 
Instance details

Defined in Plutarch.Api.V2.Contexts

Methods

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

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

PlutusType POutputDatum Source # 
Instance details

Defined in Plutarch.Api.V2.Tx

Methods

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

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

PlutusType PTxInInfo Source # 
Instance details

Defined in Plutarch.Api.V2.Tx

Methods

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

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

PlutusType PTxOut Source # 
Instance details

Defined in Plutarch.Api.V2.Tx

Methods

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

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

PlutusType PBool Source # 
Instance details

Defined in Plutarch.Bool

Methods

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

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

PlutusType PData Source # 
Instance details

Defined in Plutarch.Builtin

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 #

PlutusType PByteString Source # 
Instance details

Defined in Plutarch.ByteString

Methods

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

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

PlutusType PInteger Source # 
Instance details

Defined in Plutarch.Integer

Methods

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

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

PlutusType POpaque Source # 
Instance details

Defined in Plutarch.Internal.Other

Methods

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

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

PlutusType PPositive Source # 
Instance details

Defined in Plutarch.Positive

Methods

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

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

PlutusType PRational Source # 
Instance details

Defined in Plutarch.Rational

Methods

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

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

PlutusType PString Source # 
Instance details

Defined in Plutarch.String

Methods

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

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

PlutusType (PExtended a) Source # 
Instance details

Defined in Plutarch.Api.V1.Interval

Methods

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

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

PlutusType (PInterval a) Source # 
Instance details

Defined in Plutarch.Api.V1.Interval

Methods

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

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

PlutusType (PLowerBound a) Source # 
Instance details

Defined in Plutarch.Api.V1.Interval

Methods

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

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

PlutusType (PUpperBound a) Source # 
Instance details

Defined in Plutarch.Api.V1.Interval

Methods

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

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

PlutusType (PMaybeData a) Source # 
Instance details

Defined in Plutarch.Api.V1.Maybe

Methods

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

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

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

Defined in Plutarch.Builtin

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 #

PLift a => PlutusType (PBuiltinList a) Source # 
Instance details

Defined in Plutarch.Builtin

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 #

SListI l => PlutusType (PDataRecord l) Source # 
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 :: PType). 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) :: PType Source #

type PCovariant' (PDataSum defs) Source #

type PContravariant' (PDataSum defs) Source #

type PVariant' (PDataSum defs) Source #

Methods

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

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

PlutusType (PTxList a) Source # 
Instance details

Defined in Plutarch.FFI

Associated Types

type PInner (PTxList a) :: PType Source #

type PCovariant' (PTxList a) Source #

type PContravariant' (PTxList a) Source #

type PVariant' (PTxList a) Source #

Methods

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

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

PlutusType (PTxMaybe a) Source # 
Instance details

Defined in Plutarch.FFI

Methods

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

pmatch' :: forall (s :: S) (b :: PType). Term s (PInner (PTxMaybe a)) -> (PTxMaybe 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) :: PType Source #

type PCovariant' (PFix f) Source #

type PContravariant' (PFix f) Source #

type PVariant' (PFix f) Source #

Methods

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

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

PlutusType (PList a) Source # 
Instance details

Defined in Plutarch.List

Associated Types

type PInner (PList a) :: PType Source #

type PCovariant' (PList a) Source #

type PContravariant' (PList a) Source #

type PVariant' (PList a) Source #

Methods

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

pmatch' :: forall (s :: S) (b :: PType). 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) :: PType Source #

type PCovariant' (PMaybe a) Source #

type PContravariant' (PMaybe a) Source #

type PVariant' (PMaybe a) Source #

Methods

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

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

PlutusType (PUnit :: S -> Type) Source # 
Instance details

Defined in Plutarch.Unit

Methods

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

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

PlutusType (PValue keys amounts) Source # 
Instance details

Defined in Plutarch.Api.V1.Value

Associated Types

type PInner (PValue keys amounts) :: PType Source #

type PCovariant' (PValue keys amounts) Source #

type PContravariant' (PValue keys amounts) Source #

type PVariant' (PValue keys amounts) Source #

Methods

pcon' :: forall (s :: S). PValue keys amounts s -> Term s (PInner (PValue keys amounts)) Source #

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

PlutusType (PBuiltinPair a b) Source # 
Instance details

Defined in Plutarch.Builtin

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 #

PlutusType (PEither a b) Source # 
Instance details

Defined in Plutarch.Either

Associated Types

type PInner (PEither a b) :: PType Source #

type PCovariant' (PEither a b) Source #

type PContravariant' (PEither a b) Source #

type PVariant' (PEither a b) Source #

Methods

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

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

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

Defined in Plutarch.Internal.PlutusType

Associated Types

type PInner (a :--> b) :: PType Source #

type PCovariant' (a :--> b) Source #

type PContravariant' (a :--> b) Source #

type PVariant' (a :--> b) Source #

Methods

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

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

PlutusType (PForall f) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

Associated Types

type PInner (PForall f) :: PType Source #

type PCovariant' (PForall f) Source #

type PContravariant' (PForall f) Source #

type PVariant' (PForall f) Source #

Methods

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

pmatch' :: forall (s :: S) (b :: PType). 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) :: PType Source #

type PCovariant' (PSome f) Source #

type PContravariant' (PSome f) Source #

type PVariant' (PSome f) Source #

Methods

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

pmatch' :: forall (s :: S) (b :: PType). 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

Methods

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

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

PlutusType (PPair a b) Source # 
Instance details

Defined in Plutarch.Pair

Associated Types

type PInner (PPair a b) :: PType Source #

type PCovariant' (PPair a b) Source #

type PContravariant' (PPair a b) Source #

type PVariant' (PPair a b) Source #

Methods

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

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

PlutusType (PMap keysort k v) Source # 
Instance details

Defined in Plutarch.Api.V1.AssocMap

Associated Types

type PInner (PMap keysort k v) :: PType Source #

type PCovariant' (PMap keysort k v) Source #

type PContravariant' (PMap keysort k v) Source #

type PVariant' (PMap keysort k v) Source #

Methods

pcon' :: forall (s :: S). PMap keysort k v s -> Term s (PInner (PMap keysort k v)) Source #

pmatch' :: forall (s :: S) (b :: PType). Term s (PInner (PMap keysort k v)) -> (PMap keysort k v s -> Term s b) -> Term s b Source #

type family PInner a :: PType Source #

Instances

Instances details
type PInner PAddress Source # 
Instance details

Defined in Plutarch.Api.V1.Address

type PInner PCredential Source # 
Instance details

Defined in Plutarch.Api.V1.Address

type PInner PStakingCredential Source # 
Instance details

Defined in Plutarch.Api.V1.Address

type PInner PScriptContext Source # 
Instance details

Defined in Plutarch.Api.V1.Contexts

type PInner PScriptPurpose Source # 
Instance details

Defined in Plutarch.Api.V1.Contexts

type PInner PTxInfo Source # 
Instance details

Defined in Plutarch.Api.V1.Contexts

type PInner PPubKeyHash Source # 
Instance details

Defined in Plutarch.Api.V1.Crypto

type PInner PDCert Source # 
Instance details

Defined in Plutarch.Api.V1.DCert

type PInner PDatum Source # 
Instance details

Defined in Plutarch.Api.V1.Scripts

type PInner PDatumHash Source # 
Instance details

Defined in Plutarch.Api.V1.Scripts

type PInner PRedeemer Source # 
Instance details

Defined in Plutarch.Api.V1.Scripts

type PInner PRedeemerHash Source # 
Instance details

Defined in Plutarch.Api.V1.Scripts

type PInner PScriptHash Source # 
Instance details

Defined in Plutarch.Api.V1.Scripts

type PInner PPOSIXTime Source # 
Instance details

Defined in Plutarch.Api.V1.Time

type PInner PTxId Source # 
Instance details

Defined in Plutarch.Api.V1.Tx

type PInner PTxInInfo Source # 
Instance details

Defined in Plutarch.Api.V1.Tx

type PInner PTxOut Source # 
Instance details

Defined in Plutarch.Api.V1.Tx

type PInner PTxOutRef Source # 
Instance details

Defined in Plutarch.Api.V1.Tx

type PInner PCurrencySymbol Source # 
Instance details

Defined in Plutarch.Api.V1.Value

type PInner PTokenName Source # 
Instance details

Defined in Plutarch.Api.V1.Value

type PInner PScriptContext Source # 
Instance details

Defined in Plutarch.Api.V2.Contexts

type PInner PTxInfo Source # 
Instance details

Defined in Plutarch.Api.V2.Contexts

type PInner POutputDatum Source # 
Instance details

Defined in Plutarch.Api.V2.Tx

type PInner PTxInInfo Source # 
Instance details

Defined in Plutarch.Api.V2.Tx

type PInner PTxOut Source # 
Instance details

Defined in Plutarch.Api.V2.Tx

type PInner PBool Source # 
Instance details

Defined in Plutarch.Bool

type PInner PData Source # 
Instance details

Defined in Plutarch.Builtin

type PInner PByteString Source # 
Instance details

Defined in Plutarch.ByteString

type PInner PInteger Source # 
Instance details

Defined in Plutarch.Integer

type PInner POpaque Source # 
Instance details

Defined in Plutarch.Internal.Other

type PInner PPositive Source # 
Instance details

Defined in Plutarch.Positive

type PInner PRational Source # 
Instance details

Defined in Plutarch.Rational

type PInner PString Source # 
Instance details

Defined in Plutarch.String

type PInner (PExtended a) Source # 
Instance details

Defined in Plutarch.Api.V1.Interval

type PInner (PInterval a) Source # 
Instance details

Defined in Plutarch.Api.V1.Interval

type PInner (PLowerBound a) Source # 
Instance details

Defined in Plutarch.Api.V1.Interval

type PInner (PUpperBound a) Source # 
Instance details

Defined in Plutarch.Api.V1.Interval

type PInner (PMaybeData a) Source # 
Instance details

Defined in Plutarch.Api.V1.Maybe

type PInner (PAsData a) Source # 
Instance details

Defined in Plutarch.Builtin

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

Defined in Plutarch.Builtin

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 (PTxList a) Source # 
Instance details

Defined in Plutarch.FFI

type PInner (PTxList a)
type PInner (PTxMaybe a) Source # 
Instance details

Defined in Plutarch.FFI

type PInner (PTxMaybe a)
type PInner (PFix f) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PInner (PFix f) = f (PFix f)
type PInner (PList a) Source # 
Instance details

Defined in Plutarch.List

type PInner (PMaybe a) Source # 
Instance details

Defined in Plutarch.Maybe

type PInner (PUnit :: S -> Type) Source # 
Instance details

Defined in Plutarch.Unit

type PInner (PUnit :: S -> Type) = PUnit :: S -> Type
type PInner (PValue keys amounts) Source # 
Instance details

Defined in Plutarch.Api.V1.Value

type PInner (PValue keys amounts) = DerivedPInner (DPTStrat (PValue keys amounts)) (PValue keys amounts)
type PInner (PBuiltinPair a b) Source # 
Instance details

Defined in Plutarch.Builtin

type PInner (PEither a b) Source # 
Instance details

Defined in Plutarch.Either

type PInner (PEither a b) = DerivedPInner (DPTStrat (PEither a b)) (PEither a b)
type PInner (a :--> b) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PInner (a :--> b) = a :--> b
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 (PPair a b) Source # 
Instance details

Defined in Plutarch.Pair

type PInner (PPair a b) = DerivedPInner (DPTStrat (PPair a b)) (PPair a b)
type PInner (PMap keysort k v) Source # 
Instance details

Defined in Plutarch.Api.V1.AssocMap

type PInner (PMap keysort k v) = DerivedPInner (DPTStrat (PMap keysort k v)) (PMap keysort k v)

pcon :: PlutusType a => a s -> Term s a Source #

Construct a Plutarch Term via a Haskell datatype

pmatch :: PlutusType a => Term s a -> (a s -> Term s b) -> Term s b Source #

Pattern match over Plutarch Terms via a Haskell datatype

type PCon = PlutusType Source #

Deprecated: Use PlutusType

type PMatch = PlutusType Source #

Deprecated: Use PlutusType

prettyTerm :: Config -> ClosedTerm a -> Doc () Source #

Prettify a Plutarch term.

This will call error if there's a compilation failure. Use prettyTerm' for a non-partial version.

Example ==

import Plutarch.Prelude
import Plutarch.Api.V1
import Plutarch.Extra.TermCont

checkSignatory :: Term s (PPubKeyHash :--> PScriptContext :--> PUnit)
checkSignatory = plam $ ph ctx' -> unTermCont $ do
  ctx <- pletFieldsC ["txInfo", "purpose"] ctx'
  purph <- pmatchC ctx.purpose
  pure $ case purph of
    PSpending _ ->
      let signatories = pfield "signatories" # ctx.txInfo
      in pif
          (pelem # pdata ph # pfromData signatories)
          -- Success!
          (pconstant ())
          -- Signature not present.
          perror
    _ -> ptraceError "checkSignatoryCont: not a spending tx"

Prettification result:

let frSndPair = !!sndPair
    unDataSum = (xF -> frSndPair (unConstrData xF))
    frTailList = !tailList
    frHeadList = !headList
    frIfThenElse = !ifThenElse
in (oP4ECBT qsrxlF0Y7 ->
      let cjlB6yrGk = unDataSum qsrxlF0Y7
          cRFO = unConstrData (frHeadList (frTailList cjlB6yrGk))
          cs9iR = !!fstPair cRFO
          w4 = frSndPair cRFO
      in if equalsInteger 1 cs9iR
           then if (vModHwqYB ->
                      let blM6d67 =
                            (x5sad ePDSInSEC ->
                               !(!!chooseList
                                   ePDSInSEC
                                   ~False
                                   ~(if equalsData
                                          (frHeadList ePDSInSEC)
                                          vModHwqYB
                                       then True
                                       else x5sad (frTailList ePDSInSEC))))
                          mC = (jfZs -> blM6d67 (itzT -> jfZs jfZs itzT))
                      in blM6d67 (ispwp_oeT -> mC mC ispwp_oeT))
                     (bData oP4ECBT)
                     (unListData
                        let q6X3 = frHeadList cjlB6yrGk
                        in frHeadList
                             let olbZ = unDataSum q6X3
                             in frTailList
                                  (frTailList
                                     (frTailList
                                        (frTailList
                                           (frTailList
                                              (frTailList
                                                 (frTailList olbZ)))))))
                  then ()
                  else ERROR
           else !(!trace "checkSignatoryCont: not a spending tx" ~ERROR))

Semantics ==

Constants ===

  • Builtin integers are printed as regular integers. [0-9]+
  • Builtin bytestrings are printed in hex notation, prefixed by `0x`. 0x[0-9a-f]+/i
  • Builtin strings are printed as is.
  • Builtin unit is printed as the unit literal. ()
  • Builtin booleans are printed as the literal True or False.
  • Builtin lists are prettified as list literals, i.e delimited with `[` and `]`.
  • Builtin pairs are prettified as 2-ary tuple literals, e.g. `(a, b)`.
  • I data (i.e data encoded integers) are prettified like builtin integers with a # prefix. #[0-9]+
  • B data (i.e data encoded bytestrings) are prettified like builtin bytestrings with a # prefix. #0x[0-9a-f]+/i
  • List data (i.e data encoded lists) are prettified like builtin lists with a # prefix.
  • Map data is printed like record literals. Delimited by `{` and `}`.

Each key value pair is prettified like key = value and multiple pairs are joined with `,`.

For example, `Map [(I 42, I 0), (I 100, I 1)]` is prettified as `{ #42 = #0, #100 = #1 }` - Constr data has two core elements in its prettified form:

  • The constructor index, prettified as an integer prefixed with Σ (sigma).
  • Its fields, prettified as a list.

These two elements are then joined with a . (period).

For example, `Constr 1 [I 42]` is prettified as "Σ1.[#42]".

Builtin functions ===

Builtin functions are prettified into their name, in title case.

Forced term ===

Forced terms are prefixed with a !. The unary operator ! has higher fixity than function application.

Delayed term ===

Delayed terms are prefixed with a ~. The unary operator ~ has higher fixity than function application.

Var ===

Random names are generated for all variable bindings, and these names are used to refer to them.

Names are always unique, between 1 and 8 characters in length, and begin with a lowercase letter.

Names may consist of alphanumeric characters, underscore, or single quotes.

LamAbs ===

Lambdas are prettified similar to haskell lambdas, i.e `x -> ...`.

Lambdas with multiple arguments are detected and simplified: `x y z -> ...`.

Apply ===

Application is, simply, a space - just like haskell. `f x`.

Multi arg applications to the same function are detected and simplified: `f x y`.

Error term ===

perror is represented by the literal ERROR.

Special handling ===

To achieve better prettification, certain AST structures are given special handling logic.

  • The AST structure produced by plet (Single Apply + LamAbs pair) is prettified into Haskell-like let bindings.
  • Lazy ifthenelse (pif in particular, not pif`) is detected and prettified into Haskell-like syntax: `if cond then expr1 else expr2`.

Chains of ifthenelse are nested:

 if cond
   then expr1
   else if cond
     then expr2
     else expr3
 
  • When generating names for bindings, well known structures are identified and given special names.

This machinery is made to be extensible in the future.

For example, the structure of the pfix function is well known and constant - so it is simply called fix in the output.

Bindings to forced builtin functions inherit the builtin function name, prefixed with a fr.

prettyScript :: Script -> Doc () Source #

prettyTerm for pre-compiled Scripts.

printTerm :: HasCallStack => Config -> ClosedTerm a -> String Source #

Prettyprint a Term via the PLC pretty printer

TODO: Heavily improve. It's unreadable right now.

We could convert the de Bruijn indices into names with:

show . prettyPlcReadableDef . (\(Right p) -> p) . Scripts.mkTermToEvaluate . compile $ term

printScript :: Script -> String Source #

Prettyprint a compiled Script via the PLC pretty printer

pinl :: Term s a -> (Term s a -> Term s b) -> Term s b Source #

pto :: Term s a -> Term s (PInner a) Source #

Safely coerce from a Term to it's PInner representation.

pfix :: Term s (((a :--> b) :--> (a :--> b)) :--> (a :--> b)) Source #

Fixpoint recursion. Used to encode recursive functions.

Example:

iterateN' ::
 Term s (PInteger :--> (a :--> a) :--> a :--> a) ->
 Term s PInteger ->
 Term s (a :--> a) ->
 Term s a
iterateN' self n f x =
  pif (n #== 0) x (self # n - 1 #$ f x)

iterateN :: Term s (PInteger :--> (a :--> a) :--> a :--> a)
iterateN = pfix #$ plam iterateN'

Further examples can be found in examples/Recursion.hs

newtype POpaque s Source #

An Arbitrary Term with an unknown type

Constructors

POpaque (Term s POpaque) 

Instances

Instances details
PlutusType POpaque Source # 
Instance details

Defined in Plutarch.Internal.Other

Methods

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

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

type PContravariant' POpaque Source # 
Instance details

Defined in Plutarch.Internal.Other

type PCovariant' POpaque Source # 
Instance details

Defined in Plutarch.Internal.Other

type PInner POpaque Source # 
Instance details

Defined in Plutarch.Internal.Other

type PVariant' POpaque Source # 
Instance details

Defined in Plutarch.Internal.Other

type PVariant' POpaque = ()

popaque :: Term s a -> Term s POpaque Source #

Erase the type of a Term

plam :: forall c. (PLamN a b s, HasCallStack) => (Term s c -> a) -> Term s (c :--> b) Source #

newtype TermCont :: forall (r :: PType). S -> Type -> Type where Source #

Constructors

TermCont :: forall r s a. ((a -> Term s r) -> Term s r) -> TermCont @r s a 

Instances

Instances details
MonadFail (TermCont s) Source # 
Instance details

Defined in Plutarch.TermCont

Methods

fail :: String -> TermCont s a Source #

Applicative (TermCont s) Source # 
Instance details

Defined in Plutarch.TermCont

Methods

pure :: a -> TermCont s a Source #

(<*>) :: TermCont s (a -> b) -> TermCont s a -> TermCont s b Source #

liftA2 :: (a -> b -> c) -> TermCont s a -> TermCont s b -> TermCont s c Source #

(*>) :: TermCont s a -> TermCont s b -> TermCont s b Source #

(<*) :: TermCont s a -> TermCont s b -> TermCont s a Source #

Functor (TermCont s) Source # 
Instance details

Defined in Plutarch.TermCont

Methods

fmap :: (a -> b) -> TermCont s a -> TermCont s b Source #

(<$) :: a -> TermCont s b -> TermCont s a Source #

Monad (TermCont s) Source # 
Instance details

Defined in Plutarch.TermCont

Methods

(>>=) :: TermCont s a -> (a -> TermCont s b) -> TermCont s b Source #

(>>) :: TermCont s a -> TermCont s b -> TermCont s b Source #

return :: a -> TermCont s a Source #

$sel:runTermCont:TermCont :: TermCont @r s a -> (a -> Term s r) -> Term s r Source #

unTermCont :: TermCont @a s (Term s a) -> Term s a Source #

newtype Config Source #

Constructors

Config 

Instances

Instances details
Default Config Source #

Default is to be efficient

Instance details

Defined in Plutarch.Internal

Methods

def :: Config Source #

pgetConfig :: (Config -> Term s a) -> Term s a Source #

newtype PForall (b :: a -> PType) s Source #

Constructors

PForall (forall (x :: a). Term s (b x)) 

Instances

Instances details
PlutusType (PForall f) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

Associated Types

type PInner (PForall f) :: PType Source #

type PCovariant' (PForall f) Source #

type PContravariant' (PForall f) Source #

type PVariant' (PForall f) Source #

Methods

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

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

type PContravariant' (PForall f) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PCovariant' (PForall f) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PInner (PForall f) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PInner (PForall f) = PForall f
type PVariant' (PForall f) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

data PSome (b :: a -> PType) s Source #

Constructors

forall (x :: a). PSome (Term s (b x)) 

Instances

Instances details
PlutusType (PSome f) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

Associated Types

type PInner (PSome f) :: PType Source #

type PCovariant' (PSome f) Source #

type PContravariant' (PSome f) Source #

type PVariant' (PSome f) Source #

Methods

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

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

type PContravariant' (PSome f) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PCovariant' (PSome f) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PInner (PSome f) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PInner (PSome f) = PSome f
type PVariant' (PSome f) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PVariant' (PSome f)

newtype PScottEncoded a r s Source #

Constructors

PScottEncoded (Term s (ScottFn (ScottList a r) r)) 

Instances

Instances details
PlutusType (PScottEncoded a r) Source # 
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 :: PType). Term s (PInner (PScottEncoded a r)) -> (PScottEncoded a r s -> Term s b) -> Term s b Source #

type PContravariant' (PScottEncoded a r) Source # 
Instance details

Defined in Plutarch.Internal.ScottEncoding

type PCovariant' (PScottEncoded a r) Source # 
Instance details

Defined in Plutarch.Internal.ScottEncoding

type PInner (PScottEncoded a r) Source # 
Instance details

Defined in Plutarch.Internal.ScottEncoding

type PVariant' (PScottEncoded a r) Source # 
Instance details

Defined in Plutarch.Internal.ScottEncoding

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

Instances

Instances details
DerivePlutusType PAddress Source # 
Instance details

Defined in Plutarch.Api.V1.Address

Associated Types

type DPTStrat PAddress Source #

DerivePlutusType PCredential Source # 
Instance details

Defined in Plutarch.Api.V1.Address

Associated Types

type DPTStrat PCredential Source #

DerivePlutusType PStakingCredential Source # 
Instance details

Defined in Plutarch.Api.V1.Address

Associated Types

type DPTStrat PStakingCredential Source #

DerivePlutusType PScriptContext Source # 
Instance details

Defined in Plutarch.Api.V1.Contexts

Associated Types

type DPTStrat PScriptContext Source #

DerivePlutusType PScriptPurpose Source # 
Instance details

Defined in Plutarch.Api.V1.Contexts

Associated Types

type DPTStrat PScriptPurpose Source #

DerivePlutusType PTxInfo Source # 
Instance details

Defined in Plutarch.Api.V1.Contexts

Associated Types

type DPTStrat PTxInfo Source #

DerivePlutusType PPubKeyHash Source # 
Instance details

Defined in Plutarch.Api.V1.Crypto

Associated Types

type DPTStrat PPubKeyHash Source #

DerivePlutusType PDCert Source # 
Instance details

Defined in Plutarch.Api.V1.DCert

Associated Types

type DPTStrat PDCert Source #

DerivePlutusType PDatum Source # 
Instance details

Defined in Plutarch.Api.V1.Scripts

Associated Types

type DPTStrat PDatum Source #

DerivePlutusType PDatumHash Source # 
Instance details

Defined in Plutarch.Api.V1.Scripts

Associated Types

type DPTStrat PDatumHash Source #

DerivePlutusType PRedeemer Source # 
Instance details

Defined in Plutarch.Api.V1.Scripts

Associated Types

type DPTStrat PRedeemer Source #

DerivePlutusType PRedeemerHash Source # 
Instance details

Defined in Plutarch.Api.V1.Scripts

Associated Types

type DPTStrat PRedeemerHash Source #

DerivePlutusType PScriptHash Source # 
Instance details

Defined in Plutarch.Api.V1.Scripts

Associated Types

type DPTStrat PScriptHash Source #

DerivePlutusType PPOSIXTime Source # 
Instance details

Defined in Plutarch.Api.V1.Time

Associated Types

type DPTStrat PPOSIXTime Source #

DerivePlutusType PTxId Source # 
Instance details

Defined in Plutarch.Api.V1.Tx

Associated Types

type DPTStrat PTxId Source #

DerivePlutusType PTxInInfo Source # 
Instance details

Defined in Plutarch.Api.V1.Tx

Associated Types

type DPTStrat PTxInInfo Source #

DerivePlutusType PTxOut Source # 
Instance details

Defined in Plutarch.Api.V1.Tx

Associated Types

type DPTStrat PTxOut Source #

DerivePlutusType PTxOutRef Source # 
Instance details

Defined in Plutarch.Api.V1.Tx

Associated Types

type DPTStrat PTxOutRef Source #

DerivePlutusType PCurrencySymbol Source # 
Instance details

Defined in Plutarch.Api.V1.Value

Associated Types

type DPTStrat PCurrencySymbol Source #

DerivePlutusType PTokenName Source # 
Instance details

Defined in Plutarch.Api.V1.Value

Associated Types

type DPTStrat PTokenName Source #

DerivePlutusType PScriptContext Source # 
Instance details

Defined in Plutarch.Api.V2.Contexts

Associated Types

type DPTStrat PScriptContext Source #

DerivePlutusType PTxInfo Source # 
Instance details

Defined in Plutarch.Api.V2.Contexts

Associated Types

type DPTStrat PTxInfo Source #

DerivePlutusType POutputDatum Source # 
Instance details

Defined in Plutarch.Api.V2.Tx

Associated Types

type DPTStrat POutputDatum Source #

DerivePlutusType PTxInInfo Source # 
Instance details

Defined in Plutarch.Api.V2.Tx

Associated Types

type DPTStrat PTxInInfo Source #

DerivePlutusType PTxOut Source # 
Instance details

Defined in Plutarch.Api.V2.Tx

Associated Types

type DPTStrat PTxOut Source #

DerivePlutusType PByteString Source # 
Instance details

Defined in Plutarch.ByteString

Associated Types

type DPTStrat PByteString Source #

DerivePlutusType PInteger Source # 
Instance details

Defined in Plutarch.Integer

Associated Types

type DPTStrat PInteger Source #

DerivePlutusType PPositive Source # 
Instance details

Defined in Plutarch.Positive

Associated Types

type DPTStrat PPositive Source #

DerivePlutusType PRational Source # 
Instance details

Defined in Plutarch.Rational

Associated Types

type DPTStrat PRational Source #

DerivePlutusType PString Source # 
Instance details

Defined in Plutarch.String

Associated Types

type DPTStrat PString Source #

DerivePlutusType (PExtended a) Source # 
Instance details

Defined in Plutarch.Api.V1.Interval

Associated Types

type DPTStrat (PExtended a) Source #

DerivePlutusType (PInterval a) Source # 
Instance details

Defined in Plutarch.Api.V1.Interval

Associated Types

type DPTStrat (PInterval a) Source #

DerivePlutusType (PLowerBound a) Source # 
Instance details

Defined in Plutarch.Api.V1.Interval

Associated Types

type DPTStrat (PLowerBound a) Source #

DerivePlutusType (PUpperBound a) Source # 
Instance details

Defined in Plutarch.Api.V1.Interval

Associated Types

type DPTStrat (PUpperBound a) Source #

DerivePlutusType (PMaybeData a) Source # 
Instance details

Defined in Plutarch.Api.V1.Maybe

Associated Types

type DPTStrat (PMaybeData a) Source #

DerivePlutusType (PList a) Source # 
Instance details

Defined in Plutarch.List

Associated Types

type DPTStrat (PList a) Source #

DerivePlutusType (PMaybe a) Source # 
Instance details

Defined in Plutarch.Maybe

Associated Types

type DPTStrat (PMaybe a) Source #

DerivePlutusType (PValue keys amounts) Source # 
Instance details

Defined in Plutarch.Api.V1.Value

Associated Types

type DPTStrat (PValue keys amounts) Source #

DerivePlutusType (PEither a b) Source # 
Instance details

Defined in Plutarch.Either

Associated Types

type DPTStrat (PEither a b) Source #

DerivePlutusType (PPair a b) Source # 
Instance details

Defined in Plutarch.Pair

Associated Types

type DPTStrat (PPair a b) Source #

DerivePlutusType (PMap keysort k v) Source # 
Instance details

Defined in Plutarch.Api.V1.AssocMap

Associated Types

type DPTStrat (PMap keysort k v) Source #

type family DPTStrat a :: Type Source #

Instances

Instances details
type DPTStrat PAddress Source # 
Instance details

Defined in Plutarch.Api.V1.Address

type DPTStrat PCredential Source # 
Instance details

Defined in Plutarch.Api.V1.Address

type DPTStrat PStakingCredential Source # 
Instance details

Defined in Plutarch.Api.V1.Address

type DPTStrat PScriptContext Source # 
Instance details

Defined in Plutarch.Api.V1.Contexts

type DPTStrat PScriptPurpose Source # 
Instance details

Defined in Plutarch.Api.V1.Contexts

type DPTStrat PTxInfo Source # 
Instance details

Defined in Plutarch.Api.V1.Contexts

type DPTStrat PPubKeyHash Source # 
Instance details

Defined in Plutarch.Api.V1.Crypto

type DPTStrat PDCert Source # 
Instance details

Defined in Plutarch.Api.V1.DCert

type DPTStrat PDatum Source # 
Instance details

Defined in Plutarch.Api.V1.Scripts

type DPTStrat PDatumHash Source # 
Instance details

Defined in Plutarch.Api.V1.Scripts

type DPTStrat PRedeemer Source # 
Instance details

Defined in Plutarch.Api.V1.Scripts

type DPTStrat PRedeemerHash Source # 
Instance details

Defined in Plutarch.Api.V1.Scripts

type DPTStrat PScriptHash Source # 
Instance details

Defined in Plutarch.Api.V1.Scripts

type DPTStrat PPOSIXTime Source # 
Instance details

Defined in Plutarch.Api.V1.Time

type DPTStrat PTxId Source # 
Instance details

Defined in Plutarch.Api.V1.Tx

type DPTStrat PTxInInfo Source # 
Instance details

Defined in Plutarch.Api.V1.Tx

type DPTStrat PTxOut Source # 
Instance details

Defined in Plutarch.Api.V1.Tx

type DPTStrat PTxOutRef Source # 
Instance details

Defined in Plutarch.Api.V1.Tx

type DPTStrat PCurrencySymbol Source # 
Instance details

Defined in Plutarch.Api.V1.Value

type DPTStrat PTokenName Source # 
Instance details

Defined in Plutarch.Api.V1.Value

type DPTStrat PScriptContext Source # 
Instance details

Defined in Plutarch.Api.V2.Contexts

type DPTStrat PTxInfo Source # 
Instance details

Defined in Plutarch.Api.V2.Contexts

type DPTStrat POutputDatum Source # 
Instance details

Defined in Plutarch.Api.V2.Tx

type DPTStrat PTxInInfo Source # 
Instance details

Defined in Plutarch.Api.V2.Tx

type DPTStrat PTxOut Source # 
Instance details

Defined in Plutarch.Api.V2.Tx

type DPTStrat PByteString Source # 
Instance details

Defined in Plutarch.ByteString

type DPTStrat PInteger Source # 
Instance details

Defined in Plutarch.Integer

type DPTStrat PPositive Source # 
Instance details

Defined in Plutarch.Positive

type DPTStrat PRational Source # 
Instance details

Defined in Plutarch.Rational

type DPTStrat PString Source # 
Instance details

Defined in Plutarch.String

type DPTStrat (PExtended a) Source # 
Instance details

Defined in Plutarch.Api.V1.Interval

type DPTStrat (PInterval a) Source # 
Instance details

Defined in Plutarch.Api.V1.Interval

type DPTStrat (PLowerBound a) Source # 
Instance details

Defined in Plutarch.Api.V1.Interval

type DPTStrat (PUpperBound a) Source # 
Instance details

Defined in Plutarch.Api.V1.Interval

type DPTStrat (PMaybeData a) Source # 
Instance details

Defined in Plutarch.Api.V1.Maybe

type DPTStrat (PList a) Source # 
Instance details

Defined in Plutarch.List

type DPTStrat (PMaybe a) Source # 
Instance details

Defined in Plutarch.Maybe

type DPTStrat (PValue keys amounts) Source # 
Instance details

Defined in Plutarch.Api.V1.Value

type DPTStrat (PValue keys amounts) = PlutusTypeNewtype
type DPTStrat (PEither a b) Source # 
Instance details

Defined in Plutarch.Either

type DPTStrat (PPair a b) Source # 
Instance details

Defined in Plutarch.Pair

type DPTStrat (PMap keysort k v) Source # 
Instance details

Defined in Plutarch.Api.V1.AssocMap

type DPTStrat (PMap keysort k v) = PlutusTypeNewtype

class (forall t. PCovariant'' t => PCovariant'' (a t)) => PCovariant a Source #

Instances

Instances details
(forall (t :: PType). PCovariant'' t => PCovariant'' (a t)) => PCovariant a Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type family PCovariant' a :: Constraint Source #

Instances

Instances details
type PCovariant' PAddress Source # 
Instance details

Defined in Plutarch.Api.V1.Address

type PCovariant' PCredential Source # 
Instance details

Defined in Plutarch.Api.V1.Address

type PCovariant' PStakingCredential Source # 
Instance details

Defined in Plutarch.Api.V1.Address

type PCovariant' PScriptContext Source # 
Instance details

Defined in Plutarch.Api.V1.Contexts

type PCovariant' PScriptPurpose Source # 
Instance details

Defined in Plutarch.Api.V1.Contexts

type PCovariant' PTxInfo Source # 
Instance details

Defined in Plutarch.Api.V1.Contexts

type PCovariant' PPubKeyHash Source # 
Instance details

Defined in Plutarch.Api.V1.Crypto

type PCovariant' PDCert Source # 
Instance details

Defined in Plutarch.Api.V1.DCert

type PCovariant' PDatum Source # 
Instance details

Defined in Plutarch.Api.V1.Scripts

type PCovariant' PDatumHash Source # 
Instance details

Defined in Plutarch.Api.V1.Scripts

type PCovariant' PRedeemer Source # 
Instance details

Defined in Plutarch.Api.V1.Scripts

type PCovariant' PRedeemerHash Source # 
Instance details

Defined in Plutarch.Api.V1.Scripts

type PCovariant' PScriptHash Source # 
Instance details

Defined in Plutarch.Api.V1.Scripts

type PCovariant' PPOSIXTime Source # 
Instance details

Defined in Plutarch.Api.V1.Time

type PCovariant' PTxId Source # 
Instance details

Defined in Plutarch.Api.V1.Tx

type PCovariant' PTxInInfo Source # 
Instance details

Defined in Plutarch.Api.V1.Tx

type PCovariant' PTxOut Source # 
Instance details

Defined in Plutarch.Api.V1.Tx

type PCovariant' PTxOutRef Source # 
Instance details

Defined in Plutarch.Api.V1.Tx

type PCovariant' PCurrencySymbol Source # 
Instance details

Defined in Plutarch.Api.V1.Value

type PCovariant' PTokenName Source # 
Instance details

Defined in Plutarch.Api.V1.Value

type PCovariant' PScriptContext Source # 
Instance details

Defined in Plutarch.Api.V2.Contexts

type PCovariant' PTxInfo Source # 
Instance details

Defined in Plutarch.Api.V2.Contexts

type PCovariant' POutputDatum Source # 
Instance details

Defined in Plutarch.Api.V2.Tx

type PCovariant' PTxInInfo Source # 
Instance details

Defined in Plutarch.Api.V2.Tx

type PCovariant' PTxOut Source # 
Instance details

Defined in Plutarch.Api.V2.Tx

type PCovariant' PBool Source # 
Instance details

Defined in Plutarch.Bool

type PCovariant' PData Source # 
Instance details

Defined in Plutarch.Builtin

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

Defined in Plutarch.ByteString

type PCovariant' PInteger Source # 
Instance details

Defined in Plutarch.Integer

type PCovariant' POpaque Source # 
Instance details

Defined in Plutarch.Internal.Other

type PCovariant' PPositive Source # 
Instance details

Defined in Plutarch.Positive

type PCovariant' PRational Source # 
Instance details

Defined in Plutarch.Rational

type PCovariant' PString Source # 
Instance details

Defined in Plutarch.String

type PCovariant' (PExtended a) Source # 
Instance details

Defined in Plutarch.Api.V1.Interval

type PCovariant' (PInterval a) Source # 
Instance details

Defined in Plutarch.Api.V1.Interval

type PCovariant' (PLowerBound a) Source # 
Instance details

Defined in Plutarch.Api.V1.Interval

type PCovariant' (PUpperBound a) Source # 
Instance details

Defined in Plutarch.Api.V1.Interval

type PCovariant' (PMaybeData a) Source # 
Instance details

Defined in Plutarch.Api.V1.Maybe

type PCovariant' (PAsData a) Source # 
Instance details

Defined in Plutarch.Builtin

type PCovariant' (PBuiltinList a) Source # 
Instance details

Defined in Plutarch.Builtin

type PCovariant' (PDataRecord l) Source # 
Instance details

Defined in Plutarch.DataRepr.Internal

type PCovariant' (PDataSum defs) Source # 
Instance details

Defined in Plutarch.DataRepr.Internal

type PCovariant' (PDataSum defs)
type PCovariant' (PTxList a) Source # 
Instance details

Defined in Plutarch.FFI

type PCovariant' (PTxMaybe a) Source # 
Instance details

Defined in Plutarch.FFI

type PCovariant' (PFix f) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PCovariant' (PFix f)
type PCovariant' (PList a) Source # 
Instance details

Defined in Plutarch.List

type PCovariant' (PMaybe a) Source # 
Instance details

Defined in Plutarch.Maybe

type PCovariant' (PUnit :: S -> Type) Source # 
Instance details

Defined in Plutarch.Unit

type PCovariant' (PUnit :: S -> Type)
type PCovariant' (PValue keys amounts) Source # 
Instance details

Defined in Plutarch.Api.V1.Value

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

Defined in Plutarch.Builtin

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

Defined in Plutarch.Either

type PCovariant' (PEither a b)
type PCovariant' (a :--> b) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PCovariant' (PForall f) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PCovariant' (PSome f) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PCovariant' (PScottEncoded a r) Source # 
Instance details

Defined in Plutarch.Internal.ScottEncoding

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

Defined in Plutarch.Pair

type PCovariant' (PPair a b)
type PCovariant' (PMap keysort k v) Source # 
Instance details

Defined in Plutarch.Api.V1.AssocMap

type PCovariant' (PMap keysort k v)

class (forall t. PCovariant'' t => PContravariant'' (a t)) => PContravariant a Source #

Instances

Instances details
(forall (t :: PType). PCovariant'' t => PContravariant'' (a t)) => PContravariant a Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type family PContravariant' a :: Constraint Source #

Instances

Instances details
type PContravariant' PAddress Source # 
Instance details

Defined in Plutarch.Api.V1.Address

type PContravariant' PCredential Source # 
Instance details

Defined in Plutarch.Api.V1.Address

type PContravariant' PStakingCredential Source # 
Instance details

Defined in Plutarch.Api.V1.Address

type PContravariant' PScriptContext Source # 
Instance details

Defined in Plutarch.Api.V1.Contexts

type PContravariant' PScriptPurpose Source # 
Instance details

Defined in Plutarch.Api.V1.Contexts

type PContravariant' PTxInfo Source # 
Instance details

Defined in Plutarch.Api.V1.Contexts

type PContravariant' PPubKeyHash Source # 
Instance details

Defined in Plutarch.Api.V1.Crypto

type PContravariant' PDCert Source # 
Instance details

Defined in Plutarch.Api.V1.DCert

type PContravariant' PDatum Source # 
Instance details

Defined in Plutarch.Api.V1.Scripts

type PContravariant' PDatumHash Source # 
Instance details

Defined in Plutarch.Api.V1.Scripts

type PContravariant' PRedeemer Source # 
Instance details

Defined in Plutarch.Api.V1.Scripts

type PContravariant' PRedeemerHash Source # 
Instance details

Defined in Plutarch.Api.V1.Scripts

type PContravariant' PScriptHash Source # 
Instance details

Defined in Plutarch.Api.V1.Scripts

type PContravariant' PPOSIXTime Source # 
Instance details

Defined in Plutarch.Api.V1.Time

type PContravariant' PTxId Source # 
Instance details

Defined in Plutarch.Api.V1.Tx

type PContravariant' PTxInInfo Source # 
Instance details

Defined in Plutarch.Api.V1.Tx

type PContravariant' PTxOut Source # 
Instance details

Defined in Plutarch.Api.V1.Tx

type PContravariant' PTxOutRef Source # 
Instance details

Defined in Plutarch.Api.V1.Tx

type PContravariant' PCurrencySymbol Source # 
Instance details

Defined in Plutarch.Api.V1.Value

type PContravariant' PTokenName Source # 
Instance details

Defined in Plutarch.Api.V1.Value

type PContravariant' PScriptContext Source # 
Instance details

Defined in Plutarch.Api.V2.Contexts

type PContravariant' PTxInfo Source # 
Instance details

Defined in Plutarch.Api.V2.Contexts

type PContravariant' POutputDatum Source # 
Instance details

Defined in Plutarch.Api.V2.Tx

type PContravariant' PTxInInfo Source # 
Instance details

Defined in Plutarch.Api.V2.Tx

type PContravariant' PTxOut Source # 
Instance details

Defined in Plutarch.Api.V2.Tx

type PContravariant' PBool Source # 
Instance details

Defined in Plutarch.Bool

type PContravariant' PData Source # 
Instance details

Defined in Plutarch.Builtin

type PContravariant' PByteString Source # 
Instance details

Defined in Plutarch.ByteString

type PContravariant' PInteger Source # 
Instance details

Defined in Plutarch.Integer

type PContravariant' POpaque Source # 
Instance details

Defined in Plutarch.Internal.Other

type PContravariant' PPositive Source # 
Instance details

Defined in Plutarch.Positive

type PContravariant' PRational Source # 
Instance details

Defined in Plutarch.Rational

type PContravariant' PString Source # 
Instance details

Defined in Plutarch.String

type PContravariant' (PExtended a) Source # 
Instance details

Defined in Plutarch.Api.V1.Interval

type PContravariant' (PInterval a) Source # 
Instance details

Defined in Plutarch.Api.V1.Interval

type PContravariant' (PLowerBound a) Source # 
Instance details

Defined in Plutarch.Api.V1.Interval

type PContravariant' (PUpperBound a) Source # 
Instance details

Defined in Plutarch.Api.V1.Interval

type PContravariant' (PMaybeData a) Source # 
Instance details

Defined in Plutarch.Api.V1.Maybe

type PContravariant' (PAsData a) Source # 
Instance details

Defined in Plutarch.Builtin

type PContravariant' (PBuiltinList a) Source # 
Instance details

Defined in Plutarch.Builtin

type PContravariant' (PDataRecord l) Source # 
Instance details

Defined in Plutarch.DataRepr.Internal

type PContravariant' (PDataSum defs) Source # 
Instance details

Defined in Plutarch.DataRepr.Internal

type PContravariant' (PTxList a) Source # 
Instance details

Defined in Plutarch.FFI

type PContravariant' (PTxMaybe a) Source # 
Instance details

Defined in Plutarch.FFI

type PContravariant' (PFix f) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PContravariant' (PList a) Source # 
Instance details

Defined in Plutarch.List

type PContravariant' (PMaybe a) Source # 
Instance details

Defined in Plutarch.Maybe

type PContravariant' (PUnit :: S -> Type) Source # 
Instance details

Defined in Plutarch.Unit

type PContravariant' (PValue keys amounts) Source # 
Instance details

Defined in Plutarch.Api.V1.Value

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

Defined in Plutarch.Builtin

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

Defined in Plutarch.Either

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

Defined in Plutarch.Internal.PlutusType

type PContravariant' (PForall f) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PContravariant' (PSome f) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PContravariant' (PScottEncoded a r) Source # 
Instance details

Defined in Plutarch.Internal.ScottEncoding

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

Defined in Plutarch.Pair

type PContravariant' (PMap keysort k v) Source # 
Instance details

Defined in Plutarch.Api.V1.AssocMap

type PContravariant' (PMap keysort k v)

class (forall t. PVariant'' t => PVariant'' (a t)) => PVariant a Source #

Instances

Instances details
(forall (t :: PType). PVariant'' t => PVariant'' (a t)) => PVariant a Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type family PVariant' a :: Constraint Source #

Instances

Instances details
type PVariant' PAddress Source # 
Instance details

Defined in Plutarch.Api.V1.Address

type PVariant' PCredential Source # 
Instance details

Defined in Plutarch.Api.V1.Address

type PVariant' PStakingCredential Source # 
Instance details

Defined in Plutarch.Api.V1.Address

type PVariant' PScriptContext Source # 
Instance details

Defined in Plutarch.Api.V1.Contexts

type PVariant' PScriptPurpose Source # 
Instance details

Defined in Plutarch.Api.V1.Contexts

type PVariant' PTxInfo Source # 
Instance details

Defined in Plutarch.Api.V1.Contexts

type PVariant' PPubKeyHash Source # 
Instance details

Defined in Plutarch.Api.V1.Crypto

type PVariant' PDCert Source # 
Instance details

Defined in Plutarch.Api.V1.DCert

type PVariant' PDatum Source # 
Instance details

Defined in Plutarch.Api.V1.Scripts

type PVariant' PDatumHash Source # 
Instance details

Defined in Plutarch.Api.V1.Scripts

type PVariant' PRedeemer Source # 
Instance details

Defined in Plutarch.Api.V1.Scripts

type PVariant' PRedeemerHash Source # 
Instance details

Defined in Plutarch.Api.V1.Scripts

type PVariant' PScriptHash Source # 
Instance details

Defined in Plutarch.Api.V1.Scripts

type PVariant' PPOSIXTime Source # 
Instance details

Defined in Plutarch.Api.V1.Time

type PVariant' PTxId Source # 
Instance details

Defined in Plutarch.Api.V1.Tx

type PVariant' PTxInInfo Source # 
Instance details

Defined in Plutarch.Api.V1.Tx

type PVariant' PTxOut Source # 
Instance details

Defined in Plutarch.Api.V1.Tx

type PVariant' PTxOutRef Source # 
Instance details

Defined in Plutarch.Api.V1.Tx

type PVariant' PCurrencySymbol Source # 
Instance details

Defined in Plutarch.Api.V1.Value

type PVariant' PTokenName Source # 
Instance details

Defined in Plutarch.Api.V1.Value

type PVariant' PScriptContext Source # 
Instance details

Defined in Plutarch.Api.V2.Contexts

type PVariant' PTxInfo Source # 
Instance details

Defined in Plutarch.Api.V2.Contexts

type PVariant' POutputDatum Source # 
Instance details

Defined in Plutarch.Api.V2.Tx

type PVariant' PTxInInfo Source # 
Instance details

Defined in Plutarch.Api.V2.Tx

type PVariant' PTxOut Source # 
Instance details

Defined in Plutarch.Api.V2.Tx

type PVariant' PBool Source # 
Instance details

Defined in Plutarch.Bool

type PVariant' PData Source # 
Instance details

Defined in Plutarch.Builtin

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

Defined in Plutarch.ByteString

type PVariant' PInteger Source # 
Instance details

Defined in Plutarch.Integer

type PVariant' POpaque Source # 
Instance details

Defined in Plutarch.Internal.Other

type PVariant' POpaque = ()
type PVariant' PPositive Source # 
Instance details

Defined in Plutarch.Positive

type PVariant' PRational Source # 
Instance details

Defined in Plutarch.Rational

type PVariant' PString Source # 
Instance details

Defined in Plutarch.String

type PVariant' (PExtended a) Source # 
Instance details

Defined in Plutarch.Api.V1.Interval

type PVariant' (PInterval a) Source # 
Instance details

Defined in Plutarch.Api.V1.Interval

type PVariant' (PLowerBound a) Source # 
Instance details

Defined in Plutarch.Api.V1.Interval

type PVariant' (PUpperBound a) Source # 
Instance details

Defined in Plutarch.Api.V1.Interval

type PVariant' (PMaybeData a) Source # 
Instance details

Defined in Plutarch.Api.V1.Maybe

type PVariant' (PAsData a) Source # 
Instance details

Defined in Plutarch.Builtin

type PVariant' (PBuiltinList a) Source # 
Instance details

Defined in Plutarch.Builtin

type PVariant' (PDataRecord l) Source # 
Instance details

Defined in Plutarch.DataRepr.Internal

type PVariant' (PDataSum defs) Source # 
Instance details

Defined in Plutarch.DataRepr.Internal

type PVariant' (PDataSum defs)
type PVariant' (PTxList a) Source # 
Instance details

Defined in Plutarch.FFI

type PVariant' (PTxMaybe a) Source # 
Instance details

Defined in Plutarch.FFI

type PVariant' (PFix f) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PVariant' (PFix f)
type PVariant' (PList a) Source # 
Instance details

Defined in Plutarch.List

type PVariant' (PList a)
type PVariant' (PMaybe a) Source # 
Instance details

Defined in Plutarch.Maybe

type PVariant' (PMaybe a)
type PVariant' (PUnit :: S -> Type) Source # 
Instance details

Defined in Plutarch.Unit

type PVariant' (PUnit :: S -> Type)
type PVariant' (PValue keys amounts) Source # 
Instance details

Defined in Plutarch.Api.V1.Value

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

Defined in Plutarch.Builtin

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

Defined in Plutarch.Either

type PVariant' (PEither a b)
type PVariant' (a :--> b) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PVariant' (a :--> b) = (PVariant' a, PVariant' b)
type PVariant' (PForall f) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PVariant' (PSome f) Source # 
Instance details

Defined in Plutarch.Internal.PlutusType

type PVariant' (PSome f)
type PVariant' (PScottEncoded a r) Source # 
Instance details

Defined in Plutarch.Internal.ScottEncoding

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

Defined in Plutarch.Pair

type PVariant' (PPair a b)
type PVariant' (PMap keysort k v) Source # 
Instance details

Defined in Plutarch.Api.V1.AssocMap

type PVariant' (PMap keysort k v)