Skip to main content

Module project

Module project 

Source
Expand description

Projection — the human-readable rendering of a Weft module.

Weft has no source text: the graph is the ground truth. But audit is a right (spec §1.1) — commerce and Passports demand that a person can always read what a behavior does. A projection is a faithful, derived view: generated from the verified artifact on demand, never stored, never written. Local binders get generated names (a, b, c… by depth) since the code carries none — alpha-equivalence made visible.

The projection is deterministic: same module, same text, always — so a rendering can be cached, diffed, and cited by the module’s hash.

Functions§

def
Render one definition: signature, effect row, contracts, body.
module
Render a whole module: entry first, then every other definition, each headed by its full hash.