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=0.8 required=3.0 tests=BAYES_50,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:a37:606:: with SMTP id 6mr902751qkg.177.1599820647864; Fri, 11 Sep 2020 03:37:27 -0700 (PDT) X-Received: by 2002:ac8:e89:: with SMTP id v9mr1256180qti.100.1599820647518; Fri, 11 Sep 2020 03:37:27 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!aioe.org!peer01.ams4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 11 Sep 2020 03:37:27 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=92.56.166.72; posting-account=C8J7NQoAAAD_ybGY7--QIRi6KpLjoH1Z NNTP-Posting-Host: 92.56.166.72 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Visibility issue From: Daniel Injection-Date: Fri, 11 Sep 2020 10:37:27 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 2391 X-Received-Body-CRC: 2124254240 Xref: reader01.eternal-september.org comp.lang.ada:60110 List-Id: Hello, I want to use a tagged type as a link to communicate users of a library, in the way to make one part visible to them and also to hide some content that is only needed for the implementing of the library. Lets say i have the "Library" packages to expose things to users, and Implementing_Library packages to deal with the implementation: package Library.Users is type User_type is tagged with private; procedure foo_public (S: User_Type); private type User_Type is tagged with record hide_content_to_user : Natural; end record; function Access_to_hide_content return User_type; end Library.Users; private with Library.Users; package Internal_Library_Implementing is -- Some internal public developer stuff private --Here I want to get access to User_Type hide content. end Internal_Library_Implementing; I've tried using "private with" but gnat says the next: move subprogram to the visible part (RM 3.9.3(10)) private function with tagged result must override visible-part function Compiler says Im forced to make all private User_type functions public. So, are there more ways to see the hided content of this tagged type without extending the type itself in a child package? I needed to see this content outside of Library package.