From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:a05:6214:da7:: with SMTP id h7mr1411332qvh.48.1619724551545; Thu, 29 Apr 2021 12:29:11 -0700 (PDT) X-Received: by 2002:a25:9c86:: with SMTP id y6mr1596934ybo.405.1619724551404; Thu, 29 Apr 2021 12:29:11 -0700 (PDT) Path: eternal-september.org!reader02.eternal-september.org!news.mixmin.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 29 Apr 2021 12:29:11 -0700 (PDT) In-Reply-To: Injection-Info: google-groups.googlegroups.com; posting-host=35.245.252.196; posting-account=XfA3zgkAAABoz6fRf3Tehtnqqr7Ycml- NNTP-Posting-Host: 35.245.252.196 References: <78fd99c3-538d-4981-af11-c1885df36575n@googlegroups.com> <7e2ece3d-893c-43fb-bf81-6002dbd0bc3dn@googlegroups.com> <56dc220e-1341-4a9f-98cc-132c8afdc2afn@googlegroups.com> <5990d990-d8fc-489c-bb5d-7f047e14e06an@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: [Ada95] Private non-generic children of generics not allowed From: Vincent Marciante Injection-Date: Thu, 29 Apr 2021 19:29:11 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:61932 List-Id: On Thursday, April 29, 2021 at 1:43:52 PM UTC-4, AdaMagica wrote: > So what you want is an implicit instantiation as outlined below: > > generic > package Gen is > end Gen; > package body Gen is > procedure Proc is separate; > end Gen; > > private package Gen.Priv is -- will be implicitly instantiated > end Gen.Priv; > > with Gen.Priv; > separate (Gen) > procedure Proc is > begin > ...Priv.XXX... -- anything from Priv > end Proc; > > This is not very far from the solution given by ehh. I see that you got what I was describing by what you presented in your example (and yes, not very far from that of ehh) but I'm not sure that "implicit instantiation" would be the best way to describe it. I'll think about it.