CVS difference for ais/ai-00317.txt

Differences between 1.4 and version 1.5
Log of other versions for file ais/ai-00317.txt

--- ais/ai-00317.txt	2003/05/24 00:51:42	1.4
+++ ais/ai-00317.txt	2003/09/30 02:01:13	1.5
@@ -1,4 +1,4 @@
-!standard  12.07 (03)                                  03-02-05  AI95-00317/02
+!standard  12.07 (03)                                  03-09-28  AI95-00317/03
 !class amendment
 !status work item 02-10-06
 !status received 02-10-06
@@ -82,8 +82,8 @@
   The actual shall be an instance of the template.  If the
   formal_package_actual_part is (<>) or (OTHERS => <>), then the actual
   may be any instance of the template; otherwise, certain of the actual
-  parameters shall match between the actual instance and the formal
-  package:
+  parameters of the actual instance shall match the corresponding actual
+  parameter of the formal package, determined as follows:
 
      * If the formal_package_actual_part includes generic_associations
        as well as "OTHERS => <>", then only the actual parameters specified
@@ -100,8 +100,15 @@
   The visible part of a formal package includes the first list of
   basic_declarative_items of the package_specification.  In addition,
   for each actual parameter that is not required to match, a copy of the
-  declaration of the corresponding formal parameter of the template
-  is included in the visible part of the formal package.
+  declaration of the corresponding formal parameter of the template is
+  included in the visible part of the formal package. If the copied
+  declaration is for a formal type, copies of the implicit declarations
+  of the primitive subprograms of the formal type are also included in
+  the visible part of the formal package.
+
+ [NOTE: I was supposed to fix something in this paragraph to allow
+  formal.formal.xxx to work, but I can't remember the problem or
+  the solution anymore!  Does anyone have an example?]
 
 !discussion
 
@@ -112,21 +119,26 @@
 useful, without measurably increasing the complexity of supporting the
 capability.
 
-Semantic issues/choices:
+------------
 
-1) Presumably (others => <>) is exactly equivalent to (<>).
+There is an issue of which names are visible outside an instance:
 
-2) We don't talk about the what implicit declarations are
-   included in the visible part of the formal package
-   when the actuals are partially specified.  Can we
-   just assume the implementor will "do the right thing"?
-   Perhaps we should say that if and only if the copy of a
-   formal type is included in the visible part, the
-   associated implicit primitive operation declarations
-   are included.
+    generic
+        type T is new A;
+          	-- function F1 (X : T) return T; -- Implicit
+        type U is new B;
+            -- function F2 (X : U) return U; -- Implicit
+    package GP is ... end GP;
+
+    generic
+        ...
+        with package FP is new GP (T1, others => <>);
+            -- Can use FP.U, canŐt use FP.T.
 
-3) The wording seems a bit convoluted.
+So FP.F2 is OK, and FP.F1 is illegal. Thus the 12.7(10) wording has been
+adjusted so as to include copies of primitive operations.
 
+
 !example
 
 -- Imagine a generic signature package with
@@ -208,5 +220,19 @@
 !ACATS test
 
 !appendix
+
+From: Tucker Taft
+Semt: Sunday, September 28, 2003 3:41 PM
+
+Here is an update to AI-317.  Not much change.
+I was supposed to add something to 12.7(10) to
+fix a problem relating to "formal.formal.xxx"
+but I can't remember the details.
+Does anyone have a simple example to illustrate
+the problem?  I think Erhard brought it up
+a few times, but the ARG minutes don't elaborate,
+as far as I can see.
+
+[Editor's note: This is version /03 of the AI.]
 
 ****************************************************************

Questions? Ask the ACAA Technical Agent