Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Plutarch Terms

Plutarch Terms are terms in the sense of simply-typed lambda calculus terms. In a lambda calculus, we can construct terms as either “constants” or “lambdas,” and terms can either be “open” (having free variables) or “closed” (having no free variables). We compose Plutarch Terms to build up increasingly complex computations. Once all free variables are eliminated from a Term (making it a Closed Term), we can compile it using the eponymous function from the Plutarch module:

-- | Compile operates on closed terms to produce usable UPLC scripts.
compile :: forall (a :: S -> Type). Config -> (forall (s :: S). Term s a) -> Either Text Script

Terms are constructed from Haskell values and are tagged with S -> Types.