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=0.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,eeb3ea7993143012,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.223.40 with SMTP id qr8mr6116241pbc.0.1337178085775; Wed, 16 May 2012 07:21:25 -0700 (PDT) Path: pr3ni5474pbb.0!nntp.google.com!news2.google.com!goblin1!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: =?ISO-8859-15?Q?Markus_Sch=F6pflin?= Newsgroups: comp.lang.ada Subject: Declaring private packages to instantiate generics? Date: Wed, 16 May 2012 16:21:24 +0200 Organization: Aioe.org NNTP Server Message-ID: NNTP-Posting-Host: MdpKeRr+sx3LK7JQiK5aNw.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Date: 2012-05-16T16:21:24+02:00 List-Id: I just found myself wanting to write the following code, which Gnat doesn't like: ---%<--- package FOO is procedure P; end FOO; package body FOO is package BAR is new SOME_GENERIC_PACKAGE; procedure P is new BAR.P; end FOO; --->%--- Can I somehow provide the body of P without writing a procedure which just forwards to an instantiation of BAR.P, IOW without having to write: ---%<--- package body FOO is package BAR is new SOME_GENERIC_PACKAGE; procedure BAR_P is new BAR.P; procedure P is begin BAR_P; end; end FOO; --->%--- Regards, Markus