comp.lang.ada
 help / color / mirror / Atom feed
From: "Matthew Heaney" <mheaney@on2.com>
Subject: Re: Ada 200X Assertions
Date: Wed, 5 Dec 2001 16:30:26 -0500
Date: 2001-12-05T16:30:26-05:00	[thread overview]
Message-ID: <u0t48a35u1uia1@corp.supernews.com> (raw)
In-Reply-To: slrna0seip.kq.lutz@taranis.iks-jena.de


"Lutz Donnerhacke" <lutz@iks-jena.de> wrote in message
news:slrna0seip.kq.lutz@taranis.iks-jena.de...
> I've a list of degenerated compound instantiations for which only a single
> component is relevant. More than this, this same fixed component is shared
> by multiple compound instantiations.

Can you use child generics?

generic
   <whatever>
package GP is
   <foo>
end GP;

generic
   <whatever>
package GP.C_G is
   <bar>
end GP.C_G;

Instantiate the root package:

package P is new GP (<whatever>);

which can now be shared among the child instantiations:

with GP.C_G;
package P.C1 is new P.C_G (<whatever>);

with GP.C_G;
package P.C2 is new P.C_G (<whatever>);

Is this adequate?  What about package parameters?

generic
   with package P is new GP (<>);
package GQ is
   <blah>
end GG;

package P is new GP (<whatever>);

package Q1 is new GQ (P);
package Q2 is new GQ (P);

Will this do the job?

I still don't understand your problem.







  parent reply	other threads:[~2001-12-05 21:30 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-04  3:53 Ada 200X Assertions Richard Riehle
2001-12-04  8:54 ` Lutz Donnerhacke
2001-12-04 17:09   ` Robert Dewar
2001-12-05 14:34     ` Lutz Donnerhacke
2001-12-04 18:43   ` Matthew Heaney
2001-12-05 15:16     ` Lutz Donnerhacke
2001-12-05 18:40       ` Matthew Heaney
2001-12-05 19:25         ` Matthew Heaney
2001-12-05 19:36         ` Lutz Donnerhacke
2001-12-05 22:00           ` Mark Lundquist
2001-12-05 22:49             ` Matthew Heaney
2001-12-06  5:04               ` Mixins (was Re: Ada 200X Assertions) Mark Lundquist
2001-12-05 19:57       ` Access discriminants " Mark Lundquist
2001-12-05 21:30       ` Matthew Heaney [this message]
2001-12-05 21:32         ` Ada 200X Assertions Lutz Donnerhacke
2001-12-17  6:43       ` David Thompson
2001-12-17  8:55         ` Lutz Donnerhacke
2001-12-04 19:10 ` Randy Brukardt
2001-12-04 21:21   ` Ehud Lamm
2001-12-06  3:55     ` Richard Riehle
2001-12-06  9:41       ` Rod Chapman
2001-12-07 22:51     ` Mark Lundquist
2001-12-05  9:43 ` Volkert
replies disabled

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