CVS difference for ai05s/ai05-0135-1.txt

Differences between 1.2 and version 1.3
Log of other versions for file ai05s/ai05-0135-1.txt

--- ai05s/ai05-0135-1.txt	2009/02/05 05:27:35	1.2
+++ ai05s/ai05-0135-1.txt	2009/02/10 06:50:26	1.3
@@ -1,4 +1,9 @@
-!standard  8.4(3)                                   09-01-31    AI05-0135-1/00
+!standard  4.1.3(12)                                   09-02-06    AI05-0135-1/01
+!standard  8.4(3)
+!standard  8.4(4)
+!standard  8.4(8/2)
+!standard  8.4(11)
+!standard  8.4(18)
 !class Amendment 09-01-31
 !status work item 09-01-31
 !status received 08-12-17
@@ -31,14 +36,87 @@
-** TBD **
+Modify 4.1.3(12) as follows
+    The selector_name shall resolve to denote a declaration that occurs
+    immediately within the declarative region of the package or enclosing
+    construct (the declaration shall be visible at the place of the expanded
+    name  see 8.3) [, or to denote a declaration that is use-visible by
+    selection at the point of the selector name (see 8.4)].
+    The expanded name denotes that declaration. 
+Modify 8.43-4) to add optional "all" reserved word syntax:
+    use_package_clause ::= use [all] package_name {, package_name};
+    use_type_clause ::= use [all] type subtype_mark {, subtype_mark};
+Add to the end of 8.4(8/2):
+    If a use_type_clause includes the reserved word "all", then the
+    following additional declarations are also made potentially
+    use-visible in the same way as is done for the primitive operators of T:
+      - The visible primitive subprograms of T;
+      - If T is a tagged type declared immediately within a
+        package_specification, then any visible subprograms that are declared
+        immediately within the same package_specification and
+        operate on T'Class.
+Add after 8.4(11) (at the end of the Static Semantics section)
+    A use_clause which includes the reserved word "all" and which occurs
+    immediately within the visible part of a package is called a
+    *reexporting* use_clause. The scope of a reexporting use_clause
+    includes the scope of any use_package_clause which names the
+    package immediately enclosing the reexporting use_clause.
+    At the point of an expanded_name whose prefix denotes a package P (or
+    a rename thereof) the scope of any reexporting use clause which
+    occurs immediately within the visible part of P includes the
+    selector_name of the expanded name. A declaration with the same
+    identifier as that selector_name which is made
+    potentially use-visible in this way is said to be "use-visible by
+    selection" at the point of the selector_name unless
+       - a visible homograph of the declaration is declared in P; or
+       - more than one such declaration is potentially use-visible
+         by selection at the point of the selector_name and at least
+         one of them is not overloadable.
+    The above rules notwithstanding, the scope of a
+    reexporting use_clause never includes any portion of the
+    enclosing package visible part up to and including
+    the use_clause itself.
+Add after 8.4(18) (in the Examples section)
+   generic
+       type T is private;
+   package G is
+       function Make return T;
+   end G;
+   with G;
+   pragma Elaborate (G);
+   package Pkg1 is
+     type T is null record;
+     package I is new G (T);
+     use all I;
+   end Pkg1;
+   with Pkg1;
+   package Pkg2 is
+      X : Pkg1.T := Pkg1.Make;
+      use Pkg1;
+      Y : T := Make;
+   end Pkg2;
+(See wording.)
 --!corrigendum 8.4(3)
@@ -2185,5 +2263,21 @@
 but which Ada programmers have learned to avoid.  If not because they are bad
 software engineering, because any rocks they run into in those shoals will make
 them look foolish later.
+From: Steve Baird
+Date: Friday, February  6, 2009  6:18 PM
+The attached [Version /01 of the AI] is a first cut at wording for this AI.
+The syntax for this construct is still very much up in the air; I just went with
+"use all" here in order to have a specific proposal.
+Note that the new super-powers for "use all type" are completely orthogonal to the
+rest of the proposal. We are using this new reserved word to indicate two new
+properties which are really unrelated (other than that they both increase visibility).
+The only hard part of separating the two properties would be deciding on syntax.

Questions? Ask the ACAA Technical Agent