class Quoted[out P]

A block received as a typed tree rather than as a closure (docs/14 §6): a method declares &cond: Quoted[P], P a procedure type, and the block written at the call is checked as a P, then given as its tree (expr), the values it captures (captures) and as the closure too (proc). It is made only from a block literal.

<prelude>:400

Class methods

def self.new(expr: Meta::Expr, captures: Array[Object], proc: P, file: String, site: Int) -> Quoted[P]

<prelude>:407

Methods

def expr -> Meta::Expr

The block's body as a tree.

<prelude>:410

def captures -> Array[Object]

The values the tree's Meta::Expr::Capture nodes stand for, read at the call: an Array[Shareable] when P is a shareable procedure type, whose block captures only Shareable values.

<prelude>:414

def proc -> P

The block as a closure, to run it as written.

<prelude>:416

def file -> String

The file the block is written in (each node has its line).

<prelude>:418

def site -> Int

The call site's number, unique within the program: one site builds one tree, so a cache of what is made of the tree can key on it.

<prelude>:421