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

PlutusTx.Lift

Synopsis

Documentation

safeLift ∷ ∀ a e uni fun m. (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 (Term TyName Name uni fun (), Term NamedDeBruijn uni fun ()) Source #

Get a Plutus Core term corresponding to the given value.

safeLiftProgram ∷ (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 (Program TyName Name uni fun (), Program NamedDeBruijn uni fun ()) Source #

Get a Plutus Core program corresponding to the given value.

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 #

lift ∷ (Lift uni a, ThrowableBuiltins uni fun, Typecheckable uni fun, GEq uni, Default (CostingPart uni fun), Default (BuiltinsInfo uni fun), Default (RewriteRules uni fun), Hashable fun) ⇒ Version → a → (Term TyName Name uni fun (), Term NamedDeBruijn uni fun ()) Source #

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

liftProgram ∷ (Lift uni a, ThrowableBuiltins uni fun, Typecheckable uni fun, GEq uni, Default (CostingPart uni fun), Default (BuiltinsInfo uni fun), Default (RewriteRules uni fun), Hashable fun) ⇒ Version → a → (Program TyName Name uni fun (), Program NamedDeBruijn uni fun ()) Source #

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

liftProgramDefLift DefaultUni a ⇒ a → (Program TyName Name DefaultUni DefaultFun (), Program NamedDeBruijn DefaultUni DefaultFun ()) Source #

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

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.

typeCheckAgainst ∷ ∀ e a uni fun m. (Typeable uni a, AsTypeError e (Term TyName Name uni fun ()) uni fun (Provenance ()), AsTypeErrorExt e uni (Provenance ()), AsError e uni fun (Provenance ()), MonadError e m, MonadQuote m, GEq uni, Typecheckable uni fun, PrettyUni uni, Pretty fun, Default (CostingPart uni fun), Default (BuiltinsInfo uni fun), Default (RewriteRules uni fun)) ⇒ Proxy a → Program TyName Name uni fun () → m () Source #

Check that PLC term has the given type.

typeCode ∷ ∀ e a uni fun m. (Typeable uni a, AsTypeError e (Term TyName Name uni fun ()) uni fun (Provenance ()), AsTypeErrorExt e uni (Provenance ()), AsFreeVariableError e, AsError e uni fun (Provenance ()), MonadError e m, MonadQuote m, GEq uni, Typecheckable uni fun, PrettyUni uni, Pretty fun, Default (CostingPart uni fun), Default (BuiltinsInfo uni fun), Default (RewriteRules uni fun), Hashable fun) ⇒ Proxy a → Program TyName Name uni fun () → m (CompiledCodeIn uni fun a) Source #

Try to interpret a PLC program as a CompiledCodeIn of the given type. Returns successfully iff the program has the right type.