Renderingla

importa

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

examples/corpus/importa/default-braced.fab (canonical · keyword)

Canonical braced import record with private binding inferred from the path.

# 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"`.

importa { ex = "norma:chorda" }

nota "importa-braced"

examples/corpus/importa/importa.fab (canonical · keyword)

Imports names from another module or package source.

# 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.

importa ex "./auxilium" privata auxilium

incipit {
    nota auxilium.saluta("Marcus")
}