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

Transform.Lib

Description

Common UPLC term-construction helpers shared across the Transform.*.Spec test modules.

Variables are referred to by name: var "x" is an occurrence, lam "x" body a binder, and name "x" the bare Name. See Note [Names from strings].

Synopsis

Documentation

type T = Term Name DefaultUni DefaultFun () Source #

Convenient alias used throughout the test modules.

var ∷ String → T Source #

A Var occurrence of the variable with the given name. See Note [Names from strings]

lam ∷ String → T → T Source #

A lambda binding the variable with the given name. See Note [Names from strings]

app ∷ T → T → T Source #

force ∷ T → T Source #

delay ∷ T → T Source #

case_ ∷ T → [T] → T Source #

constr ∷ Word64 → [T] → T Source #

A Constr term tagged with the given index.

sopTrue ∷ T Source #

True as a sum-of-products value, Constr 0 [] (the datatype encoding of Bool).

sopFalse ∷ T Source #

False as a sum-of-products value, Constr 1 [].

builtinTrue ∷ T Source #

True as the builtin bool constant.

builtinFalse ∷ T Source #

False as the builtin bool constant.

ite ∷ T → T → T → T Source #

ifThenElse forced and applied to a condition and the two branches.

con ∷ Integer → T Source #

An Integer constant.

text ∷ String → T Source #

A Text constant from a literal.

name ∷ String → Name Source #

Build a Name from a String. See Note [Names from strings]