8.5.3 Package Renaming Declarations
is used to rename a package.]
package_renaming_declaration ::= package defining_program_unit_name renames package_name
The renamed entity shall be a package.
If the package_name
of a package_renaming_declaration denotes
a limited view of a package P, then a name that denotes the package_renaming_declaration
shall occur only within the immediate scope of the renaming or the scope
of a with_clause that mentions the package
P or, if P is a nested package, the innermost library package
use of a renaming that designates a limited view is restricted to locations
where we know whether the view is limited or nonlimited (based on a with_clause).
We don't want to make an implicit limited view, as those are not transitive
like a regular view. Implementations should be able to see all limited
views needed based on the context_clause.
declares a new view [of the renamed package].
[At places where the declaration of the limited
view of the renamed package is visible, a name
that denotes the package_renaming_declaration
denotes a limited view of the package (see 10.1.1).]
Example of renaming
package TM renames Table_Manager;
Wording Changes from Ada 95
Uses of renamed limited views of packages can only
be used within the scope of a with_clause for the renamed package.