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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,547e6c7b9fae4e1d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-23 07:15:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!fr.usenet-edu.net!usenet-edu.net!oleane.net!oleane!nnrp.oleane.net!not-for-mail From: "Jean-Pierre Rosen" Newsgroups: comp.lang.ada Subject: Re: Instanciation in a package spec. Date: Thu, 23 Jan 2003 16:13:50 +0100 Organization: Guest of France Telecom Oleane's newsreading service Message-ID: References: NNTP-Posting-Host: mailhost.axlog.fr X-Trace: s1.read.news.oleane.net 1043334881 17435 195.25.228.57 (23 Jan 2003 15:14:41 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Thu, 23 Jan 2003 15:14:41 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Xref: archiver1.google.com comp.lang.ada:33376 Date: 2003-01-23T16:13:50+01:00 List-Id: "Robert A Duff" a �crit dans le message de news: wccn0lsvth6.fsf@shell01.TheWorld.com... > "Jean-Pierre Rosen" writes: > > Since the body of the instance is elaborated at the point of instanciation, the body of the > > generic has better been elaborated already.... > > I understand the *need* for the rule in Ada. But it's still an annoying > restriction. It's perfectly reasonable to want to export a generic and > an instance of that generic from the same package. But Ada's > elaboration model prevents it. > If you make the instance a child (and put a pragma Elaborate_Body in the parent's spec), then it's OK. Of course, you won't be able to use it from the body of the parent, but if you put it in a visible part, it's presumabely for external use. -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr