Skip to main content

Module paths

Module paths 

Source
Expand description

The document tree’s logical path grammar: classification, escaping, and the physical boundary.

A logical path is a POSIX path with no extension. The seven forms a v4 document tree spells are manifest, pkg/<package>/<module>/module, pkg/<package>/<module>/<stem>.type, pkg/<package>/<module>/<stem>.value, and their deps/<package>/@<version>/... counterparts (the v4 model carries no package version, so the version slot is always the bare @, decision 0015). .type and .value are part of the logical name, not filename extensions.

This mirrors IR/src/layout/paths.ts in ecosystem/morphir-typescript, function for function; see .dev/docs/superpowers/maps/2026-09-17-reference-tree-layout-map.md section 1.

Enums§

NodeFileKind
Which of the two node-file kinds a path names.
PathKind
The kind a physical or logical path names, and what classify can read out of it.
Root
Which of the tree’s two roots a path or directory sits under.

Constants§

MANIFEST
The distribution manifest’s logical path.
VERSION_SLOT
The bare version segment a dependency directory carries, because the v4 model has no package version to hold (decision 0015).

Functions§

classify
Classifies a logical path the way the reference’s classify does, line for line: the manifest path first, then the root, then the leaf.
from_physical
The logical path a physical name carries, or None when its extension is not one the tree recognizes.
module_dir
The escaped directory a module’s files sit under: the package directory, then the module path’s escaped stems.
module_dir_prefix
The physical-path prefix every file under a module directory shares: <root>/<dir>/.
module_manifest_path
The logical path of a module’s manifest.
node_file_path
The logical path of one type’s or value’s node file.
package_dir
The escaped directory a package’s files sit under: the package path’s escaped stems, joined by /, with a trailing bare @ under deps/.
to_physical
The physical path a profile writes a logical path under: the logical path plus the profile’s extension.