lms

Light-Weight Modular staging library for D langauge.

Popularization of dependency injection framework somehow shaded the bigger and more general technique - staging and staged computation.

This library ractifies that omission for the D language.

More...

Members

Classes

BasicStage
class BasicStage

Simple stage that keeps slots as key-value pairs in built-in AA.

Box
class Box
Undocumented in source.
Constant
class Constant(T)

Simpliest of all - just a constant, stays the same, regardless of _stage_

Lift
class Lift(T)
Undocumented in source.
LmsEvaluationFailed
class LmsEvaluationFailed
Undocumented in source.
LmsException
class LmsException
Undocumented in source.
LmsNameConflict
class LmsNameConflict
Undocumented in source.
LmsNameResolution
class LmsNameResolution
Undocumented in source.
Slot
class Slot(T)

Slot - a placeholder for value, that will be provided at a later _stage_

Functions

assertThrows
void assertThrows(T expr)
Undocumented in source. Be warned that the author may not have intended to support it.
lift
Lift!T lift(T value)
Lift!T lift(Lift!T lifted)

Lift a simple constant

Interfaces

Stage
interface 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

Detailed Description

Built with love based on the ideas in the paper:

Lightweight Modular Staging: A Pragmatic Approach to Runtime Code Generation and Compiled DSLs by Tiark Rompf and Martin Odersky.

The above paper and many other good ones by Scala team at EPFL are here https://scala-lang.org/old/node/143.

Meta