privata
Translation status: ภาษาไทย reader-locale proof. Code fences render through the th-TH pipeline; prose is canonical Latin.
Marks an import as local to the current module.
Aliases: private
Syntax: importa ex <source> privata <name>
Category#
modifier
Related#
Examples#
radix/corpus/privata/privata.fab (canonical · keyword)#
Marks an import as local to the current module.
# =============================================================================
# privata — Marks an import as local to the current module.
# =============================================================================
#
# What this teaches:
# • Module-level visibility — `@ privata` restricts a declaration to the
# current module, preventing external access
# • Used as an annotation (`@ privata`) on function declarations to control
# the module boundary
#
# Common mistakes:
# • Expecting `@ privata` to enforce access control — visibility annotations are decorative only (WARN012).
#
# See also: publica, importa
# =============================================================================
# @ privata marks a declaration as private metadata
#
# Annotations attach visibility metadata to the following declaration.
#
# GRAMMAR:
# annotatedDecl :← '@' 'privata' funcDecl
#
# EXPECTED OUTPUT:
# privata
@ private
functio privatum() → string {
return "privata"
}
main {
print privatum()
}Expected output:
privata