Stage

Stage is equivalent to DI container (or rather DI is simple late-binding + basic form of staging) but the composition and execution of them is independent and encapsulated by Lift!T interface

A user is expected to sub-class and define custom stages as needed. See also BasicStage.

Members

Functions

eval
auto eval(Lift!T value)

Try to evaluate (lower) lifted value using this stage

opIndex
Box opIndex(string name)

Third implementation hook - lookup bound value for a given name

opIndexAssign
Box opIndexAssign(Box value, string name)

This is an implementation hook - bind must check that typeinfo matches and bind value to the lifted slot

partial
auto partial(U value)

Do partial evaluation for lifted value, this folds all known-constant sub-tries and optimizes expressions

register
void register(string name, Box box)

This is an implementation hook - register must save name,typeinfo pair to check type matching later

slot
Slot!T slot(string name)

Lift a placeholder - slot for concrete value to be filled in at a later stage

slot
Slot!T slot(string name, Slot!T value)

Register existing slot at this _stage_ with name name

slot
Slot!T slot(Slot!T value)

Register existing slot at this _stage_ with original name

Meta