From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.224.173.4 with SMTP id n4mr13831228qaz.3.1376126755735; Sat, 10 Aug 2013 02:25:55 -0700 (PDT) X-Received: by 10.49.64.72 with SMTP id m8mr460765qes.20.1376126755713; Sat, 10 Aug 2013 02:25:55 -0700 (PDT) Path: border1.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news-in-01.newsfeed.easynews.com!easynews.com!easynews!news.glorb.com!fx3no1874650qab.0!news-out.google.com!he10ni1415qab.0!nntp.google.com!fx3no1874645qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 10 Aug 2013 02:25:55 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=91.7.29.147; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf NNTP-Posting-Host: 91.7.29.147 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <8c81cc18-bca4-43ac-aa9b-3ae9a670370c@googlegroups.com> Subject: Re: Generics and Child Packages From: AdaMagica Injection-Date: Sat, 10 Aug 2013 09:25:55 +0000 Content-Type: text/plain; charset=ISO-8859-1 X-Received-Bytes: 2208 X-Original-Bytes: 2288 Xref: number.nntp.dca.giganews.com comp.lang.ada:182933 Date: 2013-08-10T02:25:55-07:00 List-Id: That's a very good question, and I had once the same problem. The following is a short explanation of the ideas behind private packages: package P is ... end P; private package P.Q is ... end P.Q; A client of P is meant not to be aware of the existence of P.Q. Now if you make P generic, P.Q becomes generic as well. generic ... package P is ... end P; private generic package P.Q is ... end P.Q; So how could a client instantiating P then also instantiate P.Q if he is meant not to be aware of the existence? The only way a private generic package can be used is by instantiating it in a nonprivate child of P or the body of P. This is the situation. I see your problem: You have a hierarchy of packages and for some reason you have to make is generic. This is what I tried once - I do not remember how I solved the problem. I guess a rule saying a private generic child package can only be instantiated as a private child could perhaps solve the problem. But I'm not aware of the full consequences of such a rule.