plutus-core-1.36.0.0: Language library for Plutus Core
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusIR.Transform.ThunkRecursions

Description

Implements a PIR-to-PIR transformation that makes all recursive term definitions compilable to PLC. See Note [Thunking recursions] for details.

Synopsis

Documentation

thunkRecursions ∷ (ToBuiltinMeaning uni fun, HasUnique name TermUnique, HasUnique tyname TypeUnique) ⇒ BuiltinsInfo uni fun → Term tyname name uni fun a → Term tyname name uni fun a Source #

Thunk recursions to turn recusive values of non-function type into recursive values of function type, so we can compile them.

Note: this pass breaks global uniqueness!

thunkRecursionsPass ∷ (Typecheckable uni fun, GEq uni, Applicative m) ⇒ PirTCConfig uni fun → BuiltinsInfo uni fun → Pass m TyName Name uni fun a Source #