Skip to content

Appendix B: Keywords

Every reserved keyword in Archlang, split by where it’s recognized.

Keywords in .arch files

KeywordContextEffectChapter
typeTop-levelDeclares a type15
inModule / process headerAttaches declaration to a parent module declared elsewhere4, 7
labelsBodyOpens a labels block9
requiredType bodyMandatory blank — instance must fill or drop16
cascadeType body, field modifierField value flows to descendants with override semantics17
cascade *Type body, field modifierDeclares a cascade-group root; sub-fields under the path are part of the group and replacement of the root drops the group17
appendType body, field modifierField value composes with descendants’ values17
overrideBodyReplace inherited entity with non-subtype kind18
dropBodyRemove inherited entity from this scope and below18
subscribesInterface bodyWire handler to an event interface5
processTop-level / module bodyDeclares a process7
subprocessTop-level / module body / process bodyDeclares a reusable subprocess7
doProcess bodyInvoke a subprocess7
if, elseProcess bodyConditional branch7
switchProcess bodyMulti-way branch by case label7
parallelProcess bodyConcurrent branches7
eachProcess bodyIterate over a collection7
try, catchProcess bodyError path7
fail, finishProcess bodyTerminate process with explicit outcome7
viewTop-levelDeclares a view8
focusView bodyInclude only nodes matching the label8
groupView bodyGroup by label (used with by)8
byView bodyCompanion to group8
layoutView bodyPick layout algorithm8
includeView bodyInclude nodes matching glob pattern8
excludeView bodyExclude nodes matching glob pattern8
true, falseField/label valuesBoolean literals9

Keywords in package.archspace files only

KeywordContextEffectChapter
useManifest / .arch fileImport types from another package11
fromuse clauseNames source package11
asuse clauseLocal rename11
exportType declaration / use clauseMake type visible to importers / re-export11, 15
dependenciesManifestOpens dependencies block11

name, version, and widgets are recognized as manifest field names but are not reserved — they don’t shadow identifiers anywhere.

Context-restricted keywords

Some keywords are only legal in specific bodies. Use outside that context is a parse error.

KeywordLegal only in
if, else, switch, each, try, catch, parallel, do, fail, finishProcess bodies
focus, group, by, layout, include, excludeView bodies
subscribesInterface bodies
cascade, append, requiredType bodies

What’s not a keyword

User-defined kinds — service, database, command, query, etc. — are not keywords. They’re identifiers introduced by type module … / type facet … / type interface … declarations. The parser resolves them contextually against the active kind registry.

The three base kinds module, facet, interface are likewise not keywords. They appear as parent kinds in type module service { … } and can be used directly to declare generic instances.

Reserved keyword names

User-defined kinds, fields, and labels cannot reuse reserved keywords. Attempting to declare type module process { ... } or use required as a label name is a parse error.

See also