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.6 required=5.0 tests=BAYES_00,FROM_WORDY,XPRIO autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d60e0492375aa57a,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-30 14:23:48 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!news.UVic.CA!cyclone.bc.net!news.uunet.ca!nnrp1.uunet.ca.POSTED!not-for-mail From: "Peter Coventry" Newsgroups: comp.lang.ada Subject: Visibility of private packages?? X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Message-ID: Date: Tue, 30 Jul 2002 15:23:40 -0600 NNTP-Posting-Host: 209.167.52.146 X-Trace: nnrp1.uunet.ca 1028064227 209.167.52.146 (Tue, 30 Jul 2002 17:23:47 EDT) NNTP-Posting-Date: Tue, 30 Jul 2002 17:23:47 EDT Organization: WorldCom Canada Ltd. News Reader Service Xref: archiver1.google.com comp.lang.ada:27499 Date: 2002-07-30T15:23:40-06:00 List-Id: I am trying to get my head around the visibility rules applicable to private packages. If I have the following package hierarchy: A / \ A.B1 A.B2 / A.B1.C1 A.B1 contains the interface that I wish to export to clients (i.e a type plus routines for client manipulation). A.B1.C1 contains additional routines for the type not meant for client use. A.B2 contains some inner workings, that need to use the additional routines in A.B1.C1. I want to make A.B1.C1 a private package to stop it from being misused by clients, however the compiler disallows it, citing RM 10.1.2(8): " If a with_clause of a given compilation_unit mentions a private child of some library unit, then the given compilation_unit shall be either the declaration of a private descendant of that library unit or the body or subunit of a (public or private) descendant of that library unit." Does this mean that if A.B1.C1 is private, it can only be withed by the bodies of A.B1 and other descendants of A.B1, and specs of private packages of descendants of A.B1? If this is the case, how could I structure things to give the desired effect? Thanks.