The Avail Programming Language
Mobile Users: Click here to view our text rendering warning.

Extended Imports Section

The Extends keyword begins the extended imports section. The contents of this section are zero or more import specifications separated by commas , (U+002C). Any name imported through an import specification is made available for local use in the module body. An extended imports section differs from a private imports section in but a single way: any name imported through an import specification is also re-exported for use by downstream modules.

Here is an example from the tutorial series:

Module "RPN" Uses "Avail" Extends "Avail" = ( "_+_" → "__+", "_-_" → "__-", "_×_" → "__×", "_×_" → "__*", "_÷_" → "__÷", "_÷_" → "__/" ) Entries "RPN_" Body

Via the private imports section, RPN imports every name exported from Avail for private use. Via the extended imports section, it re-exports the basic arithmetic operators under six new names. Because the custom import rules list does not end with a horizontal ellipsis (U+2026), no other names are re-exported.

‹ Private Imports Section | Return to Modules | Pragmas Section ›