def of_path

bolt@1.27.0.0 · src/role.bend:27

import bolt@1.27.0.0/src/role.bend as Role
import Base
import bolt@1.27.0.0/src/paths.bend as Paths

27# a file's role by its name alone: a LAWS.bend, a PROOF.bend, or neither
28def of_path(+path: String) -> Role:
29  Bool.pick(Role, Paths.is_laws(path), Laws{}, Bool.pick(Role, Paths.is_proof(path), Proof{}, Plain{}))

Uses (5)

Used by (3)