comp.lang.ada
 help / color / mirror / Atom feed
From: falis@east.alsys.com (Ed Falis)
Subject: Use of generic child formal package
Date: Fri, 24 Feb 1995 22:01:58 GMT
Date: 1995-02-24T22:01:58+00:00	[thread overview]
Message-ID: <D4IyJB.5C2@thomsoft.com> (raw)

Hopefully, I'm not garbling the lingo too much.

I'd like to provide an instance of a generic child unit as a formal package
actual parameter to another generic.  To wit:

generic
   -- parent's formals
package parent is ... ; end parent;

generic
   -- child's formals
package parent.child is ...; end parent.child;


with parent;
generic
   -- client formals
package client is 

   package parent_instance is new parent(...);

end client;


-- Here's the hitch:
with parent.child;
generic

   -- ??:
   with parent_instance.child is new parent.child (...);
package client.child is ...;


Gnat 2.02 doesn't like the syntax for the formal package parameter: the selected
name notation is rejected. I've tried a few other ways of declaring the formal
package, without success.


So, is it legal, or is it GNAT?

What I'm trying to do is to use multiple child units for distinct generic
implementations of generic component, binding the implementation at the
time of instantiating client.child, which will present an interface to its
own clients.

- Ed


C
So, is it legal, or is it G
C
C
C
So, is it legal?  What I'm trying to do is

   



             reply	other threads:[~1995-02-24 22:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-02-24 22:01 Ed Falis [this message]
1995-02-28 20:35 ` Use of generic child formal package Tucker Taft
1995-03-02  2:48   ` Robert Dewar
1995-03-08  0:12 ` Jack Beidler
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox