EtaReduce

scalus.uplc.transform.EtaReduce
object EtaReduce

Performs eta-reduction on a term.

Attributes

See also
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
EtaReduce.type

Members list

Value members

Concrete methods

def apply(term: Term): Term

Eta-reduces a term

Eta-reduces a term

Attributes

See also
def apply(term: Term, logger: String => Unit): Term
def etaReduce(term: Term): Term

Performs eta-reduction on a term.

Performs eta-reduction on a term.

Eta-reduction is the process of removing redundant lambda abstractions from a term. For example, the term λx. f x can be eta-reduced to f but only if

  • x is not free in f
  • f is a pure expression

Purity checking is handled by TermAnalysis.isPure. A term is pure if it does not contain any side effects, such as Error, Force of non-delayed terms, or saturated builtin applications. See TermAnalysis.isPure for comprehensive documentation on purity semantics.

Attributes

See also

TermAnalysis.isPure for purity semantics

def etaReduce(term: Term, logger: String => Unit): Term
def freeNames(term: Term): Set[String]

Returns the set of free names in a term

Returns the set of free names in a term

Attributes