Term

scalus.uplc.Term
See theTerm companion enum
object Term

Attributes

Companion
enum
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Term.type

Members list

Type members

Classlikes

object given_Flat_Term extends Flat[Term]

Attributes

Supertypes
trait Flat[Term]
class Object
trait Matchable
class Any
Self type

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def lam(name: String, names: String*)(term: Term): Term
def parseUplc(s: String): Either[String, Term]

Parse UPLC term from string using the default version (1, 1, 0)

Parse UPLC term from string using the default version (1, 1, 0)

Attributes

def parseUplc(s: String, version: (Int, Int, Int)): Either[String, Term]

Parse UPLC term from string using a specific version

Parse UPLC term from string using a specific version

Attributes

def vr(name: String): Term
def λ(name: String, names: String*)(term: Term): Term
inline def λ(inline f: Term => Term): Term

Converts a lambda value of type Term => Term into a UPLC LamAbs term expression.

Converts a lambda value of type Term => Term into a UPLC LamAbs term expression.

A lambda argument x becomes a `Term.Var(NamedDeBruijn("x"))`` variable in the UPLC term.

Attributes

Example
λ(x => x $ x)

Deprecated methods

def alphaEq(t1: Term, t2: Term): Boolean

Attributes

Deprecated
[Since version 0.13.0] Use alphaEq or α_== methods instead
def λλ(name: String)(f: Term => Term): Term

Attributes

Deprecated
[Since version 0.13.0] Use lam or λ methods instead

Givens

Extensions

Extensions

extension [A](a: A)
def asTerm: Term
extension (sc: StringContext)
def vr(args: Any*): Term

Creates a variable term.

Creates a variable term.

Value parameters

args

the arguments

Attributes

Example
 val idx = 0
 vr"foo${idx}" == Var(NamedDeBruijn("foo0"))