Angle Brackets Syntax
What it Does
Section titled “What it Does”Den provides a __findFile implementation that resolves <aspect/path>
expressions into deep aspect lookups. This is syntactic sugar for
accessing nested aspects and provides.
Enabling
Section titled “Enabling”Set __findFile via module args:
{ den, ... }: { _module.args.__findFile = den.lib.__findFile;}In any file where you want to use the angle-brackets syntax, add
__findFile to the arguments attrset to bring it into that module’s
lexical scope.
{ den, __findFile, ... }: { ...}Resolution Rules
Section titled “Resolution Rules”The <name> expression resolves through these paths in order:
<den.x.y>— resolves toconfig.den.x.y<aspect>— resolves toconfig.den.aspects.aspect(ifaspectexists inden.aspects)<aspect/sub>— resolves toconfig.den.aspects.aspect.provides.sub<namespace>— resolves toconfig.den.ful.namespace(if it is a denful)
The / separator is translated to .provides. in the lookup path.
Examples
Section titled “Examples”# Without angle bracketsden.aspects.laptop.includes = [ den.aspects.tools.provides.editors den.aspects.alice.provides.work-vpn den.provides.primary-user];
# With angle bracketsden.aspects.laptop.includes = [ <tools/editors> <alice/work-vpn> <den.provides.primary-user>];When to Use
Section titled “When to Use”Angle brackets are optional syntactic sugar. They are useful when:
- You have deeply nested provides and want shorter references.
- You are working with namespaces and want concise cross-references.
They are functionally identical to direct attribute access. The choice is a matter of style.