importa
Translation status: हिन्दी reader-locale proof. Code fences render through the hi pipeline; prose is canonical Latin.
Imports names from another module or package source.
Aliases: import
Syntax: importa ex <source> <privata|publica> (<name> [ut <alias>] | * ut <alias>)
Category#
package
Related#
Examples#
radix/corpus/importa/default-braced.fab (canonical · keyword)#
Canonical braced import record with private binding inferred from the path.
# =============================================================================
# importa — Canonical braced import record with private binding inferred from the path
# =============================================================================
#
# What this teaches:
# • Canonical braced import record with private binding inferred from the path.
# • Related keywords: ex, privata, annotation-sugar
#
# Common mistakes:
# • Letting the compiler infer an import name that collides with an existing top-level binding — use `nomen` or `ut` to disambiguate (SEM005).
#
# See also: ex, privata, annotation-sugar
# =============================================================================
# importa — canonical braced record
#
# The canonical record spells the source field and lets visibility/name defaults
# materialize the same ImportDecl as `importa ex "norma:chorda"`.
import { ex = "norma:chorda" }
print "importa-braced"radix/corpus/importa/importa.fab (canonical · keyword)#
Imports names from another module or package source.
# =============================================================================
# importa — Imports names from another module or package source
# =============================================================================
#
# What this teaches:
# • Imports names from another module or package source.
# • Related keywords: ex, privata, publica, ut
#
# Common mistakes:
# • Missing the `ex` source in the import record — an import record requires an `ex` source path.
#
# See also: ex, privata, publica, ut
# =============================================================================
# importa ex — named import from a sibling module
#
# importa ex relative path with privata symbol selection.
#
# GRAMMAR:
# importa ex "<path>" privata <name> [ut <alias>]
#
# Requires module layout: importa/importa.fab imports from importa/auxilium.fab.
# Harness compiles single files in isolation — sibling resolution needs package
# or module mode (faber check --package), not bare single-file emit.
#
# EXPECTED OUTPUT:
# "Salve, Marcus!" on successful link.
#
# BACKEND: Rust/Go e2e whitelist — single-file compile cannot resolve sibling.
import from "./auxilium" private auxilium
main {
print auxilium.saluta("Marcus")
}Expected output:
Salve, Marcus!