Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Implements a PIR-to-PIR transformation that makes all recursive term definitions compilable to PLC. See Note [Thunking recursions] for details.
Synopsis
- 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
- thunkRecursionsPass ∷ (Typecheckable uni fun, GEq uni, Applicative m) ⇒ PirTCConfig uni fun → BuiltinsInfo uni fun → Pass m TyName Name uni fun a
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 #