ScottEncodingLowering

scalus.compiler.sir.lowering.simple.ScottEncodingLowering
class ScottEncodingLowering(sir: SIR, generateErrorTraces: Boolean = ...) extends BaseSimpleLowering

Scott encoding-based lowering from Scalus Intermediate Representation SIR to UPLC Term.

This implementation uses Scott encoding for data types:

  • Nil is represented as \Nil Cons -> force Nil
  • Cons h tl is represented as (\head tail Nil Cons -> Cons head tail) h tl

Value parameters

generateErrorTraces

whether to generate error traces

sir

the Scalus Intermediate Representation to lower

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Inherited methods

def lower(): Term

Lower the SIR to UPLC Term

Lower the SIR to UPLC Term

Attributes

Inherited from:
BaseSimpleLowering