From: Yannick Duchêne (Hibou57) on
Le Sat, 14 Aug 2010 00:28:48 +0200, Yannick Duchêne (Hibou57)
<yannick_duchene(a)yahoo.fr> a écrit:
> This would turn this into
>
> procedure P (Q : Generic_S.Foo_Of);
Posted to early.

Please read instead


> This would turn this into
>
> procedure P (Q : Generic_S.Formal_Foo);
From: Stephen Leake on
sjw <simon.j.wright(a)mac.com> writes:

> On Aug 12, 11:36 am, Stephen Leake <stephen_le...(a)stephe-leake.org>
> wrote:
>
>> Post complete code, I'll try it on my version of gnat.
>
> Thanks.
>
> Remember -gnatpg!
>
> The code I posted above is the complete spec (not going to bother to
> write the body if can't get the spec to compile!):
>
> with Ada.Numerics.Generic_Complex_Arrays;
> with Ada.Numerics.Generic_Complex_Types;
>
> generic
> with package Complex_Types is new Ada.Numerics.Generic_Complex_Types (Real);
> with package Complex_Arrays is new Ada.Numerics.Generic_Complex_Arrays
> (Generic_Real_Arrays, Complex_Types);

I see the problem. Generic_Real_Arrays is the name of the parent generic
package; that's not a concrete package, so it can't be used here.


> use Complex_Arrays;
> package Ada.Numerics.Generic_Real_Arrays.Extensions is
>
> function Eigenvalues (A : Real_Matrix) return Complex_Vector;
>
> end Ada.Numerics.Generic_Real_Arrays.Extensions;

This compiles:

with Ada.Numerics.Generic_Complex_Arrays;
with Ada.Numerics.Generic_Complex_Types;
with Ada.Numerics.Generic_Real_Arrays;
generic
type Real is digits <>;
with package Real_Arrays is new Ada.Numerics.Generic_Real_Arrays (Real);
with package Complex_Types is new Ada.Numerics.Generic_Complex_Types (Real);
with package Complex_Arrays is new Ada.Numerics.Generic_Complex_Arrays (Real_Arrays, Complex_Types);
package Extensions is

function Eigenvalues (A : Real_Arrays.Real_Matrix) return Complex_Arrays.Complex_Vector;

end Extensions;

Is there some reason you want Extensions to be a child of Generic_Real_Arrays?

--
-- Stephe