3.4 Export
nestable declaration | ||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||
nestable declaration | ||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||
nestable declaration | ||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||
nestable declaration | ||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||
|
An export_item can be an identifier, operator, or other export form, such as all_from. It can also be a sequence of export_items within a group, since #%juxtapose is defined as an export form.
Similar to import, an export_item can be modified either through a subsequent block containing modifiers or by a preceding modifier with the export_items in a block. The latter order works only if the modifier itself does not need a block.
An id_name or op_name export can be an immediate identifier or operator, or it can be dotted name, such as List.length. The last component of a dotted name is used as the export name. See Namespaces for information on id_name and op_name.
When export is used before a defn, the exported names are all of the ones defined by the defn. Only defined names with the same scopes as the export identifier itself are exported; macro-introduced names from the expansion of defn will not be exported, for example. If a ~scope_like id clause is before defn, then defined names with the same scopes as id are exported. Defined names are exported only in the spaces where they are bound by defn, and not in other spaces where the same name happens to be defined in the same definition context.
> defn.macro 'namespace_auto $ns_id $(a_defn :: Sequence)':
export ~scope_like $ns_id $a_defn'
> ns5.x
5
export | |
| |
export | |
With . id_name, exports the content of the specified namespace or module import (i.e., the content that would be accessed with a prefix in the exporting context). See Namespaces for information on id_name.
export | |||
| |||
| |||
export | |||
Most id_or_ops can be exported directly without using names, but the names form disambiguates in the case of an id_or_op that is itself bound as an export form or modifier.
export | |
| |
export | |
|
Imports using import count as definitions only when the import is from a namespace. Imports from a module do no count as definitions.
The #%juxtapose form is implicitly used when an export is used after another export in an export position. See also Implicit Forms.
export | |
export modifier | |||
| |||
export modifier | |||
|
This modifier is valid only immediately within a module, and not within namespace forms.
export modifier | |
This modifier is valid only immediately within a module, and not within namespace forms.
export modifier | |
| |
export modifier | |
| |
| |
export modifier | |
| |
export modifier | |
|
module path | |
module path | |
|
module path | |
|
module path | |