plutus-tx-1.26.0.0: Libraries for Plutus Tx and its prelude
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusTx

Synopsis

Documentation

type CompiledCode = CompiledCodeIn DefaultUni DefaultFun Source #

CompiledCodeIn instantiated with default built-in types and functions.

data CompiledCodeIn uni fun a Source #

A compiled Plutus Tx program. The last type parameter indicates the type of the Haskell expression that was compiled, and hence the type of the compiled code.

Note: the compiled PLC program does *not* have normalized types, if you want to put it on the chain you must normalize the types first.

getPlc :: (Closed uni, uni `Everywhere` Flat, Flat fun) => CompiledCodeIn uni fun a -> Program NamedDeBruijn uni fun SrcSpans Source #

Get the actual Plutus Core program out of a CompiledCodeIn.

getPlcNoAnn :: (Closed uni, uni `Everywhere` Flat, Flat fun) => CompiledCodeIn uni fun a -> Program NamedDeBruijn uni fun () Source #

getPir :: (Closed uni, uni `Everywhere` Flat, Flat fun) => CompiledCodeIn uni fun a -> Maybe (Program TyName Name uni fun SrcSpans) Source #

Get the Plutus IR program, if there is one, out of a CompiledCodeIn.

getPirNoAnn :: (Closed uni, uni `Everywhere` Flat, Flat fun) => CompiledCodeIn uni fun a -> Maybe (Program TyName Name uni fun ()) Source #

applyCode :: (Closed uni, uni `Everywhere` Flat, Flat fun, Pretty fun, Everywhere uni PrettyConst, PrettyBy RenderContext (SomeTypeIn uni)) => CompiledCodeIn uni fun (a -> b) -> CompiledCodeIn uni fun a -> Either String (CompiledCodeIn uni fun b) Source #

Apply a compiled function to a compiled argument. Will fail if the versions don't match.

unsafeApplyCode :: (Closed uni, uni `Everywhere` Flat, Flat fun, Pretty fun, Everywhere uni PrettyConst, PrettyBy RenderContext (SomeTypeIn uni)) => CompiledCodeIn uni fun (a -> b) -> CompiledCodeIn uni fun a -> CompiledCodeIn uni fun b Source #

Apply a compiled function to a compiled argument. Will throw if the versions don't match, should only be used in non-production code.

data BuiltinData Source #

A type corresponding to the Plutus Core builtin equivalent of Data.

The point of this type is to be an opaque equivalent of Data, so as to ensure that it is only used in ways that the compiler can handle.

As such, you should use this type in your on-chain code, and in any data structures that you want to be representable on-chain.

For off-chain usage, there are conversion functions builtinDataToData and dataToBuiltinData, but note that these will not work on-chain.

Instances

Instances details
Data BuiltinData Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> BuiltinData -> c BuiltinData Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c BuiltinData Source #

toConstr :: BuiltinData -> Constr Source #

dataTypeOf :: BuiltinData -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c BuiltinData) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BuiltinData) Source #

gmapT :: (forall b. Data b => b -> b) -> BuiltinData -> BuiltinData Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BuiltinData -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BuiltinData -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> BuiltinData -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> BuiltinData -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> BuiltinData -> m BuiltinData Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BuiltinData -> m BuiltinData Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BuiltinData -> m BuiltinData Source #

Generic BuiltinData Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

Associated Types

type Rep BuiltinData :: Type -> Type Source #

Show BuiltinData Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

NFData BuiltinData Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

Methods

rnf :: BuiltinData -> () Source #

Eq BuiltinData Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

Ord BuiltinData Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

Eq BuiltinData Source # 
Instance details

Defined in PlutusTx.Eq

FromData BuiltinData Source # 
Instance details

Defined in PlutusTx.IsData.Class

ToData BuiltinData Source # 
Instance details

Defined in PlutusTx.IsData.Class

UnsafeFromData BuiltinData Source # 
Instance details

Defined in PlutusTx.IsData.Class

Show BuiltinData Source # 
Instance details

Defined in PlutusTx.Show

Pretty BuiltinData Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

Methods

pretty :: BuiltinData -> Doc ann

prettyList :: [BuiltinData] -> Doc ann

HasSchema BuiltinData ts Source # 
Instance details

Defined in PlutusTx.Blueprint.Class

Methods

schema :: Schema ts Source #

AsDefinitionId BuiltinData Source # 
Instance details

Defined in PlutusTx.Blueprint.Definition.Id

FromBuiltin BuiltinData BuiltinData Source # 
Instance details

Defined in PlutusTx.Builtins.Class

ToBuiltin BuiltinData BuiltinData Source # 
Instance details

Defined in PlutusTx.Builtins.Class

HasTermLevel uni Data => Lift uni BuiltinData Source # 
Instance details

Defined in PlutusTx.Lift.Class

Methods

lift :: BuiltinData -> RTCompile uni fun (Term TyName Name uni fun ()) Source #

HasTypeLevel uni Data => Typeable uni BuiltinData Source # 
Instance details

Defined in PlutusTx.Lift.Class

Methods

typeRep :: Proxy BuiltinData -> RTCompile uni fun (Type TyName uni ()) Source #

ToBuiltin [BuiltinData] (BuiltinList BuiltinData) Source # 
Instance details

Defined in PlutusTx.Builtins.Class

ToBuiltin [(BuiltinData, BuiltinData)] (BuiltinList (BuiltinPair BuiltinData BuiltinData)) Source # 
Instance details

Defined in PlutusTx.Builtins.Class

ToBuiltin (BuiltinData, BuiltinData) (BuiltinPair BuiltinData BuiltinData) Source # 
Instance details

Defined in PlutusTx.Builtins.Class

type Rep BuiltinData Source # 
Instance details

Defined in PlutusTx.Builtins.Internal

type Rep BuiltinData = D1 ('MetaData "BuiltinData" "PlutusTx.Builtins.Internal" "plutus-tx-1.26.0.0-ELMGfm2Y3X4Kns10Iro6ko" 'False) (C1 ('MetaCons "BuiltinData" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceLazy 'DecidedLazy) (Rec0 Data)))

data Data #

Constructors

Constr Integer [Data] 
Map [(Data, Data)] 
List [Data] 
I Integer 
B ByteString 

Instances

Instances details
Data Data 
Instance details

Defined in PlutusCore.Data

Methods

gfoldl :: (forall d b. Data0 d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Data -> c Data Source #

gunfold :: (forall b r. Data0 b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Data Source #

toConstr :: Data -> Constr Source #

dataTypeOf :: Data -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data0 d => c (t d)) -> Maybe (c Data) Source #

dataCast2 :: Typeable t => (forall d e. (Data0 d, Data0 e) => c (t d e)) -> Maybe (c Data) Source #

gmapT :: (forall b. Data0 b => b -> b) -> Data -> Data Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data0 d => d -> r') -> Data -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data0 d => d -> r') -> Data -> r Source #

gmapQ :: (forall d. Data0 d => d -> u) -> Data -> [u] Source #

gmapQi :: Int -> (forall d. Data0 d => d -> u) -> Data -> u Source #

gmapM :: Monad m => (forall d. Data0 d => d -> m d) -> Data -> m Data Source #

gmapMp :: MonadPlus m => (forall d. Data0 d => d -> m d) -> Data -> m Data Source #

gmapMo :: MonadPlus m => (forall d. Data0 d => d -> m d) -> Data -> m Data Source #

Generic Data 
Instance details

Defined in PlutusCore.Data

Associated Types

type Rep Data :: Type -> Type Source #

Methods

from :: Data -> Rep Data x Source #

to :: Rep Data x -> Data Source #

Read Data 
Instance details

Defined in PlutusCore.Data

Show Data 
Instance details

Defined in PlutusCore.Data

NFData Data 
Instance details

Defined in PlutusCore.Data

Methods

rnf :: Data -> () Source #

Eq Data 
Instance details

Defined in PlutusCore.Data

Methods

(==) :: Data -> Data -> Bool Source #

(/=) :: Data -> Data -> Bool Source #

Ord Data 
Instance details

Defined in PlutusCore.Data

Hashable Data 
Instance details

Defined in PlutusCore.Data

Methods

hashWithSalt :: Int -> Data -> Int

hash :: Data -> Int

NoThunks Data 
Instance details

Defined in PlutusCore.Data

Methods

noThunks :: Context -> Data -> IO (Maybe ThunkInfo)

wNoThunks :: Context -> Data -> IO (Maybe ThunkInfo)

showTypeOf :: Proxy Data -> String

Pretty Data 
Instance details

Defined in PlutusCore.Data

Methods

pretty :: Data -> Doc ann

prettyList :: [Data] -> Doc ann

Serialise Data 
Instance details

Defined in PlutusCore.Data

Methods

encode :: Data -> Encoding

decode :: Decoder s Data

encodeList :: [Data] -> Encoding

decodeList :: Decoder s [Data]

PrettyBy ConstConfig Data 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

Methods

prettyBy :: ConstConfig -> Data -> Doc ann

prettyListBy :: ConstConfig -> [Data] -> Doc ann

KnownBuiltinTypeIn DefaultUni term Data => MakeKnownIn DefaultUni term Data 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnown :: Data -> BuiltinResult term

KnownBuiltinTypeIn DefaultUni term Data => ReadKnownIn DefaultUni term Data 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown :: term -> ReadKnownM Data

Contains DefaultUni Data 
Instance details

Defined in PlutusCore.Default.Universe

Methods

knownUni :: DefaultUni (Esc Data)

KnownBuiltinTypeAst tyname DefaultUni Data => KnownTypeAst tyname DefaultUni Data 
Instance details

Defined in PlutusCore.Default.Universe

Associated Types

type IsBuiltin DefaultUni Data :: Bool

type ToHoles DefaultUni Data :: [Hole]

type ToBinds DefaultUni acc Data :: [Some TyNameRep]

Methods

toTypeAst :: proxy Data -> Type tyname DefaultUni ()

type Rep Data 
Instance details

Defined in PlutusCore.Data

type IsBuiltin DefaultUni Data 
Instance details

Defined in PlutusCore.Default.Universe

type IsBuiltin DefaultUni Data = IsBuiltin DefaultUni (ElaborateBuiltin DefaultUni Data)
type ToHoles DefaultUni Data 
Instance details

Defined in PlutusCore.Default.Universe

type ToHoles DefaultUni Data = ToHoles DefaultUni (ElaborateBuiltin DefaultUni Data)
type ToBinds DefaultUni acc Data 
Instance details

Defined in PlutusCore.Default.Universe

type ToBinds DefaultUni acc Data = ToBinds DefaultUni acc (ElaborateBuiltin DefaultUni Data)

class ToData (a :: Type) where Source #

A typeclass for types that can be converted to and from BuiltinData.

Methods

toBuiltinData :: a -> BuiltinData Source #

Convert a value to BuiltinData.

Instances

Instances details
ToData Void Source # 
Instance details

Defined in PlutusTx.IsData.Class

ToData BuiltinBLS12_381_G1_Element Source #

For the BLS12-381 G1 and G2 types we use the compress functions to convert to a ByteString and then encode that as Data as usual. We have to be more careful going the other way because we decode a Data object to (possibly) get a BuiltinByteString and then uncompress the underlying ByteString to get a group element. However uncompression can fail so we have to check what happens: we don't use bls12_381_G?_uncompress because that invokes error if something goes wrong (but we do use it for unsafeFromData).

Instance details

Defined in PlutusTx.IsData.Class

ToData BuiltinBLS12_381_G2_Element Source # 
Instance details

Defined in PlutusTx.IsData.Class

(TypeError ('Text "toBuiltinData is not supported for BuiltinBLS12_381_MlResult") :: Constraint) => ToData BuiltinBLS12_381_MlResult Source #

We do not provide instances of any of these classes for BuiltinBLS12_381_MlResult since there is no serialisation format: we expect that values of that type will only occur as the result of on-chain computations.

Instance details

Defined in PlutusTx.IsData.Class

ToData BuiltinByteString Source # 
Instance details

Defined in PlutusTx.IsData.Class

ToData BuiltinData Source # 
Instance details

Defined in PlutusTx.IsData.Class

ToData Rational Source # 
Instance details

Defined in PlutusTx.Ratio

ToData Sqrt Source # 
Instance details

Defined in PlutusTx.Sqrt

ToData Integer Source # 
Instance details

Defined in PlutusTx.IsData.Class

ToData () Source # 
Instance details

Defined in PlutusTx.IsData.Instances

ToData Bool Source # 
Instance details

Defined in PlutusTx.IsData.Instances

(TypeError ('Text "Int is not supported, use Integer instead") :: Constraint) => ToData Int Source # 
Instance details

Defined in PlutusTx.IsData.Class

ToData a => ToData (Maybe a) Source # 
Instance details

Defined in PlutusTx.IsData.Instances

ToData a => ToData [a] Source # 
Instance details

Defined in PlutusTx.IsData.Class

(ToData a, ToData b) => ToData (Either a b) Source # 
Instance details

Defined in PlutusTx.IsData.Instances

(ToData k, ToData v) => ToData (Map k v) Source #

Hand-written instances to use the underlying Map type in Data, and to be reasonably efficient.

Instance details

Defined in PlutusTx.AssocMap

(ToData a, ToData b) => ToData (a, b) Source # 
Instance details

Defined in PlutusTx.IsData.Instances

Methods

toBuiltinData :: (a, b) -> BuiltinData Source #

(ToData a, ToData b, ToData c) => ToData (a, b, c) Source # 
Instance details

Defined in PlutusTx.IsData.Instances

Methods

toBuiltinData :: (a, b, c) -> BuiltinData Source #

(ToData a, ToData b, ToData c, ToData d) => ToData (a, b, c, d) Source # 
Instance details

Defined in PlutusTx.IsData.Instances

Methods

toBuiltinData :: (a, b, c, d) -> BuiltinData Source #

class FromData (a :: Type) where Source #

Methods

fromBuiltinData :: BuiltinData -> Maybe a Source #

Convert a value from BuiltinData, returning Nothing if this fails.

Instances

Instances details
FromData Void Source # 
Instance details

Defined in PlutusTx.IsData.Class

FromData BuiltinBLS12_381_G1_Element Source # 
Instance details

Defined in PlutusTx.IsData.Class

FromData BuiltinBLS12_381_G2_Element Source # 
Instance details

Defined in PlutusTx.IsData.Class

(TypeError ('Text "fromBuiltinData is not supported for BuiltinBLS12_381_MlResult") :: Constraint) => FromData BuiltinBLS12_381_MlResult Source # 
Instance details

Defined in PlutusTx.IsData.Class

FromData BuiltinByteString Source # 
Instance details

Defined in PlutusTx.IsData.Class

FromData BuiltinData Source # 
Instance details

Defined in PlutusTx.IsData.Class

FromData Rational Source # 
Instance details

Defined in PlutusTx.Ratio

FromData Sqrt Source # 
Instance details

Defined in PlutusTx.Sqrt

FromData Integer Source # 
Instance details

Defined in PlutusTx.IsData.Class

FromData () Source # 
Instance details

Defined in PlutusTx.IsData.Instances

FromData Bool Source # 
Instance details

Defined in PlutusTx.IsData.Instances

(TypeError ('Text "Int is not supported, use Integer instead") :: Constraint) => FromData Int Source # 
Instance details

Defined in PlutusTx.IsData.Class

FromData a => FromData (Maybe a) Source # 
Instance details

Defined in PlutusTx.IsData.Instances

FromData a => FromData [a] Source # 
Instance details

Defined in PlutusTx.IsData.Class

(FromData a, FromData b) => FromData (Either a b) Source # 
Instance details

Defined in PlutusTx.IsData.Instances

(FromData k, FromData v) => FromData (Map k v) Source #

A hand-written transformation from Data to Map. Compared to unsafeFromBuiltinData, it is safe to call when it is unknown if the Data is built with Datas Map constructor. Note that it is, however, unsafe in the sense that it assumes that any map encoded in the Data is well-formed, i.e. fromBuiltinData does not perform any deduplication of keys or of key-value pairs!

Instance details

Defined in PlutusTx.AssocMap

(FromData a, FromData b) => FromData (a, b) Source # 
Instance details

Defined in PlutusTx.IsData.Instances

(FromData a, FromData b, FromData c) => FromData (a, b, c) Source # 
Instance details

Defined in PlutusTx.IsData.Instances

Methods

fromBuiltinData :: BuiltinData -> Maybe (a, b, c) Source #

(FromData a, FromData b, FromData c, FromData d) => FromData (a, b, c, d) Source # 
Instance details

Defined in PlutusTx.IsData.Instances

Methods

fromBuiltinData :: BuiltinData -> Maybe (a, b, c, d) Source #

class UnsafeFromData (a :: Type) where Source #

Methods

unsafeFromBuiltinData :: BuiltinData -> a Source #

Convert a value from BuiltinData, calling error if this fails. This is typically much faster than fromBuiltinData.

When implementing this function, make sure to call unsafeFromBuiltinData rather than fromBuiltinData when converting substructures!

This is a simple type without any validation, use with caution.

Instances

Instances details
UnsafeFromData Void Source # 
Instance details

Defined in PlutusTx.IsData.Class

UnsafeFromData BuiltinBLS12_381_G1_Element Source # 
Instance details

Defined in PlutusTx.IsData.Class

UnsafeFromData BuiltinBLS12_381_G2_Element Source # 
Instance details

Defined in PlutusTx.IsData.Class

(TypeError ('Text "unsafeFromBuiltinData is not supported for BuiltinBLS12_381_MlResult") :: Constraint) => UnsafeFromData BuiltinBLS12_381_MlResult Source # 
Instance details

Defined in PlutusTx.IsData.Class

UnsafeFromData BuiltinByteString Source # 
Instance details

Defined in PlutusTx.IsData.Class

UnsafeFromData BuiltinData Source # 
Instance details

Defined in PlutusTx.IsData.Class

UnsafeFromData Rational Source # 
Instance details

Defined in PlutusTx.Ratio

UnsafeFromData Sqrt Source # 
Instance details

Defined in PlutusTx.Sqrt

UnsafeFromData Integer Source # 
Instance details

Defined in PlutusTx.IsData.Class

UnsafeFromData () Source # 
Instance details

Defined in PlutusTx.IsData.Instances

UnsafeFromData Bool Source # 
Instance details

Defined in PlutusTx.IsData.Instances

(TypeError ('Text "Int is not supported, use Integer instead") :: Constraint) => UnsafeFromData Int Source # 
Instance details

Defined in PlutusTx.IsData.Class

UnsafeFromData a => UnsafeFromData (Maybe a) Source # 
Instance details

Defined in PlutusTx.IsData.Instances

UnsafeFromData a => UnsafeFromData [a] Source # 
Instance details

Defined in PlutusTx.IsData.Class

(UnsafeFromData a, UnsafeFromData b) => UnsafeFromData (Either a b) Source # 
Instance details

Defined in PlutusTx.IsData.Instances

(UnsafeFromData k, UnsafeFromData v) => UnsafeFromData (Map k v) Source #

A hand-written transformation from Data to Map. It is unsafe because the caller must provide the guarantee that the Data is constructed using the Datas Map constructor. Note that it assumes, like the fromBuiltinData transformation, that the map encoded in the Data is well-formed, i.e. unsafeFromBuiltinData does not perform any deduplication of keys or of key-value pairs!

Instance details

Defined in PlutusTx.AssocMap

(UnsafeFromData a, UnsafeFromData b) => UnsafeFromData (a, b) Source # 
Instance details

Defined in PlutusTx.IsData.Instances

(UnsafeFromData a, UnsafeFromData b, UnsafeFromData c) => UnsafeFromData (a, b, c) Source # 
Instance details

Defined in PlutusTx.IsData.Instances

Methods

unsafeFromBuiltinData :: BuiltinData -> (a, b, c) Source #

(UnsafeFromData a, UnsafeFromData b, UnsafeFromData c, UnsafeFromData d) => UnsafeFromData (a, b, c, d) Source # 
Instance details

Defined in PlutusTx.IsData.Instances

Methods

unsafeFromBuiltinData :: BuiltinData -> (a, b, c, d) Source #

toData :: ToData a => a -> Data Source #

Convert a value to Data.

fromData :: FromData a => Data -> Maybe a Source #

Convert a value from Data, returning Nothing if this fails.

builtinDataToData :: BuiltinData -> Data Source #

Convert a BuiltinData into a Data. Only works off-chain.

dataToBuiltinData :: Data -> BuiltinData Source #

Convert a Data into a BuiltinData. Only works off-chain.

unstableMakeIsData :: Name -> Q [Dec] Source #

Generate a FromData and a ToData instance for a type. This may not be stable in the face of constructor additions, renamings, etc. Use makeIsDataIndexed if you need stability.

makeIsDataIndexed :: Name -> [(Name, Int)] -> Q [Dec] Source #

Generate a ToData, 'FromData and a UnsafeFromData instances for a type, using an explicit mapping of constructor names to indices. Use this for types where you need to keep the representation stable.

makeIsDataSchemaIndexed :: Name -> [(Name, Natural)] -> Q [InstanceDec] Source #

Generate a ToData, FromData, UnsafeFromData, HasSchema instances for a type, using an explicit mapping of constructor names to indices. Use this for types where you need to keep the representation stable.

class Lift uni a Source #

Class for types which can be lifted into Plutus IR. Instances should be derived, do not write your own instance!

Minimal complete definition

lift

Instances

Instances details
Lift DefaultUni Rational Source # 
Instance details

Defined in PlutusTx.Ratio

Methods

lift :: Rational -> RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ()) Source #

Lift DefaultUni Sqrt Source # 
Instance details

Defined in PlutusTx.Sqrt

Methods

lift :: Sqrt -> RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ()) Source #

Lift DefaultUni () Source # 
Instance details

Defined in PlutusTx.Lift.Instances

Methods

lift :: () -> RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ()) Source #

Lift DefaultUni Bool Source # 
Instance details

Defined in PlutusTx.Lift.Instances

Methods

lift :: Bool -> RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ()) Source #

HasTermLevel uni Element => Lift uni BuiltinBLS12_381_G1_Element Source # 
Instance details

Defined in PlutusTx.Lift.Class

Methods

lift :: BuiltinBLS12_381_G1_Element -> RTCompile uni fun (Term TyName Name uni fun ()) Source #

HasTermLevel uni Element => Lift uni BuiltinBLS12_381_G2_Element Source # 
Instance details

Defined in PlutusTx.Lift.Class

Methods

lift :: BuiltinBLS12_381_G2_Element -> RTCompile uni fun (Term TyName Name uni fun ()) Source #

HasTermLevel uni MlResult => Lift uni BuiltinBLS12_381_MlResult Source # 
Instance details

Defined in PlutusTx.Lift.Class

Methods

lift :: BuiltinBLS12_381_MlResult -> RTCompile uni fun (Term TyName Name uni fun ()) Source #

HasTermLevel uni Bool => Lift uni BuiltinBool Source # 
Instance details

Defined in PlutusTx.Lift.Class

Methods

lift :: BuiltinBool -> RTCompile uni fun (Term TyName Name uni fun ()) Source #

HasTermLevel uni ByteString => Lift uni BuiltinByteString Source # 
Instance details

Defined in PlutusTx.Lift.Class

Methods

lift :: BuiltinByteString -> RTCompile uni fun (Term TyName Name uni fun ()) Source #

HasTermLevel uni Data => Lift uni BuiltinData Source # 
Instance details

Defined in PlutusTx.Lift.Class

Methods

lift :: BuiltinData -> RTCompile uni fun (Term TyName Name uni fun ()) Source #

HasTermLevel uni Text => Lift uni BuiltinString Source # 
Instance details

Defined in PlutusTx.Lift.Class

Methods

lift :: BuiltinString -> RTCompile uni fun (Term TyName Name uni fun ()) Source #

HasTermLevel uni () => Lift uni BuiltinUnit Source # 
Instance details

Defined in PlutusTx.Lift.Class

Methods

lift :: BuiltinUnit -> RTCompile uni fun (Term TyName Name uni fun ()) Source #

HasTermLevel uni Integer => Lift uni Integer Source # 
Instance details

Defined in PlutusTx.Lift.Class

Methods

lift :: Integer -> RTCompile uni fun (Term TyName Name uni fun ()) Source #

(TypeError ('Text "Int is not supported, use Integer instead") :: Constraint) => Lift uni Int Source # 
Instance details

Defined in PlutusTx.Lift.Class

Methods

lift :: Int -> RTCompile uni fun (Term TyName Name uni fun ()) Source #

(Typeable DefaultUni a, Lift DefaultUni a) => Lift DefaultUni (Maybe a) Source # 
Instance details

Defined in PlutusTx.Lift.Instances

Methods

lift :: Maybe a -> RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ()) Source #

(Typeable DefaultUni a, Lift DefaultUni a) => Lift DefaultUni [a] Source # 
Instance details

Defined in PlutusTx.Lift.Instances

Methods

lift :: [a] -> RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ()) Source #

(FromBuiltin arep a, HasTermLevel uni [a]) => Lift uni (BuiltinList arep) Source # 
Instance details

Defined in PlutusTx.Lift.Class

Methods

lift :: BuiltinList arep -> RTCompile uni fun (Term TyName Name uni fun ()) Source #

(Typeable DefaultUni a, Typeable DefaultUni b, Lift DefaultUni a, Lift DefaultUni b) => Lift DefaultUni (Either a b) Source # 
Instance details

Defined in PlutusTx.Lift.Instances

Methods

lift :: Either a b -> RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ()) Source #

Lift DefaultUni [(k, v)] => Lift DefaultUni (Map k v) Source # 
Instance details

Defined in PlutusTx.AssocMap

Methods

lift :: Map k v -> RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ()) Source #

(Typeable DefaultUni a, Typeable DefaultUni b, Lift DefaultUni a, Lift DefaultUni b) => Lift DefaultUni (a, b) Source # 
Instance details

Defined in PlutusTx.Lift.Instances

Methods

lift :: (a, b) -> RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ()) Source #

(FromBuiltin arep a, FromBuiltin brep b, HasTermLevel uni (a, b)) => Lift uni (BuiltinPair arep brep) Source # 
Instance details

Defined in PlutusTx.Lift.Class

Methods

lift :: BuiltinPair arep brep -> RTCompile uni fun (Term TyName Name uni fun ()) Source #

(Typeable DefaultUni a, Typeable DefaultUni b, Typeable DefaultUni c, Lift DefaultUni a, Lift DefaultUni b, Lift DefaultUni c) => Lift DefaultUni (a, b, c) Source # 
Instance details

Defined in PlutusTx.Lift.Instances

Methods

lift :: (a, b, c) -> RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ()) Source #

(Typeable DefaultUni a, Typeable DefaultUni b, Typeable DefaultUni c, Typeable DefaultUni d, Lift DefaultUni a, Lift DefaultUni b, Lift DefaultUni c, Lift DefaultUni d) => Lift DefaultUni (a, b, c, d) Source # 
Instance details

Defined in PlutusTx.Lift.Instances

Methods

lift :: (a, b, c, d) -> RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ()) Source #

(Typeable DefaultUni a, Typeable DefaultUni b, Typeable DefaultUni c, Typeable DefaultUni d, Typeable DefaultUni e, Lift DefaultUni a, Lift DefaultUni b, Lift DefaultUni c, Lift DefaultUni d, Lift DefaultUni e) => Lift DefaultUni (a, b, c, d, e) Source # 
Instance details

Defined in PlutusTx.Lift.Instances

Methods

lift :: (a, b, c, d, e) -> RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ()) Source #

class Typeable uni (a :: k) Source #

Class for types which have a corresponding Plutus IR type. Instances should always be derived, do not write your own instance!

Minimal complete definition

typeRep

Instances

Instances details
Typeable DefaultUni Rational Source # 
Instance details

Defined in PlutusTx.Ratio

Methods

typeRep :: Proxy Rational -> RTCompile DefaultUni fun (Type TyName DefaultUni ()) Source #

Typeable DefaultUni Sqrt Source # 
Instance details

Defined in PlutusTx.Sqrt

Methods

typeRep :: Proxy Sqrt -> RTCompile DefaultUni fun (Type TyName DefaultUni ()) Source #

Typeable DefaultUni () Source # 
Instance details

Defined in PlutusTx.Lift.Instances

Methods

typeRep :: Proxy () -> RTCompile DefaultUni fun (Type TyName DefaultUni ()) Source #

Typeable DefaultUni Bool Source # 
Instance details

Defined in PlutusTx.Lift.Instances

Methods

typeRep :: Proxy Bool -> RTCompile DefaultUni fun (Type TyName DefaultUni ()) Source #

HasTypeLevel uni ByteString => Typeable uni ByteString Source # 
Instance details

Defined in PlutusTx.Lift.Class

Methods

typeRep :: Proxy ByteString -> RTCompile uni fun (Type TyName uni ()) Source #

HasTypeLevel uni Element => Typeable uni BuiltinBLS12_381_G1_Element Source # 
Instance details

Defined in PlutusTx.Lift.Class

Methods

typeRep :: Proxy BuiltinBLS12_381_G1_Element -> RTCompile uni fun (Type TyName uni ()) Source #

HasTypeLevel uni Element => Typeable uni BuiltinBLS12_381_G2_Element Source # 
Instance details

Defined in PlutusTx.Lift.Class

Methods

typeRep :: Proxy BuiltinBLS12_381_G2_Element -> RTCompile uni fun (Type TyName uni ()) Source #

HasTypeLevel uni MlResult => Typeable uni BuiltinBLS12_381_MlResult Source # 
Instance details

Defined in PlutusTx.Lift.Class

Methods

typeRep :: Proxy BuiltinBLS12_381_MlResult -> RTCompile uni fun (Type TyName uni ()) Source #

HasTypeLevel uni Bool => Typeable uni BuiltinBool Source # 
Instance details

Defined in PlutusTx.Lift.Class

Methods

typeRep :: Proxy BuiltinBool -> RTCompile uni fun (Type TyName uni ()) Source #

HasTypeLevel uni ByteString => Typeable uni BuiltinByteString Source # 
Instance details

Defined in PlutusTx.Lift.Class

Methods

typeRep :: Proxy BuiltinByteString -> RTCompile uni fun (Type TyName uni ()) Source #

HasTypeLevel uni Data => Typeable uni BuiltinData Source # 
Instance details

Defined in PlutusTx.Lift.Class

Methods

typeRep :: Proxy BuiltinData -> RTCompile uni fun (Type TyName uni ()) Source #

HasTypeLevel uni Text => Typeable uni BuiltinString Source # 
Instance details

Defined in PlutusTx.Lift.Class

Methods

typeRep :: Proxy BuiltinString -> RTCompile uni fun (Type TyName uni ()) Source #

HasTypeLevel uni () => Typeable uni BuiltinUnit Source # 
Instance details

Defined in PlutusTx.Lift.Class

Methods

typeRep :: Proxy BuiltinUnit -> RTCompile uni fun (Type TyName uni ()) Source #

HasTypeLevel uni Integer => Typeable uni Integer Source # 
Instance details

Defined in PlutusTx.Lift.Class

Methods

typeRep :: Proxy Integer -> RTCompile uni fun (Type TyName uni ()) Source #

(TypeError ('Text "Int is not supported, use Integer instead") :: Constraint) => Typeable uni Int Source # 
Instance details

Defined in PlutusTx.Lift.Class

Methods

typeRep :: Proxy Int -> RTCompile uni fun (Type TyName uni ()) Source #

(Typeable uni f, Typeable uni a) => Typeable uni (f a :: k) Source # 
Instance details

Defined in PlutusTx.Lift.Class

Methods

typeRep :: Proxy (f a) -> RTCompile uni fun (Type TyName uni ()) Source #

Typeable DefaultUni (,,,,) Source # 
Instance details

Defined in PlutusTx.Lift.Instances

Methods

typeRep :: Proxy (,,,,) -> RTCompile DefaultUni fun (Type TyName DefaultUni ()) Source #

Typeable DefaultUni (,,,) Source # 
Instance details

Defined in PlutusTx.Lift.Instances

Methods

typeRep :: Proxy (,,,) -> RTCompile DefaultUni fun (Type TyName DefaultUni ()) Source #

Typeable DefaultUni (,,) Source # 
Instance details

Defined in PlutusTx.Lift.Instances

Methods

typeRep :: Proxy (,,) -> RTCompile DefaultUni fun (Type TyName DefaultUni ()) Source #

Typeable DefaultUni Either Source # 
Instance details

Defined in PlutusTx.Lift.Instances

Methods

typeRep :: Proxy Either -> RTCompile DefaultUni fun (Type TyName DefaultUni ()) Source #

Typeable DefaultUni Map Source # 
Instance details

Defined in PlutusTx.AssocMap

Methods

typeRep :: Proxy Map -> RTCompile DefaultUni fun (Type TyName DefaultUni ()) Source #

Typeable DefaultUni (,) Source # 
Instance details

Defined in PlutusTx.Lift.Instances

Methods

typeRep :: Proxy (,) -> RTCompile DefaultUni fun (Type TyName DefaultUni ()) Source #

HasTypeLevel uni (,) => Typeable uni BuiltinPair Source # 
Instance details

Defined in PlutusTx.Lift.Class

Methods

typeRep :: Proxy BuiltinPair -> RTCompile uni fun (Type TyName uni ()) Source #

Typeable DefaultUni Maybe Source # 
Instance details

Defined in PlutusTx.Lift.Instances

Methods

typeRep :: Proxy Maybe -> RTCompile DefaultUni fun (Type TyName DefaultUni ()) Source #

Typeable DefaultUni List Source # 
Instance details

Defined in PlutusTx.Lift.Instances

Methods

typeRep :: Proxy List -> RTCompile DefaultUni fun (Type TyName DefaultUni ()) Source #

HasTypeLevel uni List => Typeable uni BuiltinList Source # 
Instance details

Defined in PlutusTx.Lift.Class

Methods

typeRep :: Proxy BuiltinList -> RTCompile uni fun (Type TyName uni ()) Source #

Typeable uni (->) Source # 
Instance details

Defined in PlutusTx.Lift.Class

Methods

typeRep :: Proxy (->) -> RTCompile uni fun (Type TyName uni ()) Source #

safeLiftCode :: (Lift uni a, AsTypeError e (Term TyName Name uni fun ()) uni fun (Provenance ()), GEq uni, AsTypeErrorExt e uni (Provenance ()), AsFreeVariableError e, AsError e uni fun (Provenance ()), MonadError e m, MonadQuote m, Typecheckable uni fun, PrettyUni uni, Pretty fun, Default (CostingPart uni fun), Default (BuiltinsInfo uni fun), Default (RewriteRules uni fun), Hashable fun) => Version -> a -> m (CompiledCodeIn uni fun a) Source #

liftCode :: (Lift uni a, GEq uni, ThrowableBuiltins uni fun, Typecheckable uni fun, Default (CostingPart uni fun), Default (BuiltinsInfo uni fun), Default (RewriteRules uni fun), Hashable fun) => Version -> a -> CompiledCodeIn uni fun a Source #

Get a Plutus Core program corresponding to the given value as a CompiledCodeIn, throwing any errors that occur as exceptions and ignoring fresh names.

liftCodeDef :: (Lift uni a, GEq uni, ThrowableBuiltins uni fun, Typecheckable uni fun, Default (CostingPart uni fun), Default (BuiltinsInfo uni fun), Default (RewriteRules uni fun), Hashable fun) => a -> CompiledCodeIn uni fun a Source #

Get a Plutus Core program with the default version, corresponding to the given value as a CompiledCodeIn, throwing any errors that occur as exceptions and ignoring fresh names.