Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
-
data
CompiledCodeIn
uni fun a
- = SerializedCode ByteString ( Maybe ByteString ) CoverageIndex
- | DeserializedCode ( Program NamedDeBruijn uni fun ()) ( Maybe ( Program TyName Name uni fun ())) CoverageIndex
- type CompiledCode = CompiledCodeIn DefaultUni DefaultFun
- applyCode :: ( Closed uni, uni `Everywhere` Flat , Flat fun, uni `Everywhere` PrettyConst , GShow uni, Pretty fun) => CompiledCodeIn uni fun (a -> b) -> CompiledCodeIn uni fun a -> CompiledCodeIn uni fun b
- sizePlc :: ( Closed uni, uni `Everywhere` Flat , Flat fun, uni `Everywhere` PrettyConst , GShow uni, Pretty fun) => CompiledCodeIn uni fun a -> Integer
- newtype ImpossibleDeserialisationFailure = ImpossibleDeserialisationFailure DecodeException
- getPlc :: ( Closed uni, uni `Everywhere` Flat , Flat fun, uni `Everywhere` PrettyConst , GShow uni, Pretty fun) => CompiledCodeIn uni fun a -> Program NamedDeBruijn uni fun ()
- getPir :: ( Closed uni, uni `Everywhere` Flat , Flat fun) => CompiledCodeIn uni fun a -> Maybe ( Program TyName Name uni fun ())
- getCovIdx :: CompiledCodeIn uni fun a -> CoverageIndex
Documentation
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.
SerializedCode ByteString ( Maybe ByteString ) CoverageIndex |
Serialized UPLC code and possibly serialized PIR code with metadata used for program coverage. |
DeserializedCode ( Program NamedDeBruijn uni fun ()) ( Maybe ( Program TyName Name uni fun ())) CoverageIndex |
Deserialized UPLC program, and possibly deserialized PIR program with metadata used for program coverage. |
Instances
( Closed uni, Everywhere uni Flat , Flat fun, Everywhere uni PrettyConst , GShow uni, Pretty fun) => Flat ( CompiledCodeIn uni fun a) Source # | |
Defined in PlutusTx.Code |
type CompiledCode = CompiledCodeIn DefaultUni DefaultFun Source #
CompiledCodeIn
instantiated with default built-in types and functions.
applyCode :: ( Closed uni, uni `Everywhere` Flat , Flat fun, uni `Everywhere` PrettyConst , GShow uni, Pretty fun) => CompiledCodeIn uni fun (a -> b) -> CompiledCodeIn uni fun a -> CompiledCodeIn uni fun b Source #
Apply a compiled function to a compiled argument.
sizePlc :: ( Closed uni, uni `Everywhere` Flat , Flat fun, uni `Everywhere` PrettyConst , GShow uni, Pretty fun) => CompiledCodeIn uni fun a -> Integer Source #
The size of a
CompiledCodeIn
, in AST nodes.
newtype ImpossibleDeserialisationFailure Source #
Instances
getPlc :: ( Closed uni, uni `Everywhere` Flat , Flat fun, uni `Everywhere` PrettyConst , GShow uni, Pretty fun) => CompiledCodeIn uni fun a -> Program NamedDeBruijn uni fun () Source #
Get the actual Plutus Core program out of a
CompiledCodeIn
.
getPir :: ( Closed uni, uni `Everywhere` Flat , Flat fun) => CompiledCodeIn uni fun a -> Maybe ( Program TyName Name uni fun ()) Source #
Get the Plutus IR program, if there is one, out of a
CompiledCodeIn
.
getCovIdx :: CompiledCodeIn uni fun a -> CoverageIndex Source #