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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Received: by 2002:ac8:4647:: with SMTP id f7mr4063786qto.361.1578499006661; Wed, 08 Jan 2020 07:56:46 -0800 (PST) X-Received: by 2002:a9d:24ea:: with SMTP id z97mr4719393ota.345.1578499006330; Wed, 08 Jan 2020 07:56:46 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!g89no454815qtd.0!news-out.google.com!w29ni281qtc.0!nntp.google.com!g89no454812qtd.0!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 8 Jan 2020 07:56:46 -0800 (PST) Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=2003:d4:ff14:a301:b8f:aceb:8d08:ffe5; posting-account=3zVVBwoAAAC7BSMfgNP7DSbqU9urpt40 NNTP-Posting-Host: 2003:d4:ff14:a301:b8f:aceb:8d08:ffe5 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: decomposing large packages From: mario.blunk.gplus@gmail.com Injection-Date: Wed, 08 Jan 2020 15:56:46 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:57803 Date: 2020-01-08T07:56:46-08:00 List-Id: Hello, I have a package P (spec and body) which is becoming greater and greater as= more functionality is implemented. Is there a way to decompose the package= into smaller packages S1, S2, etc ? I'm thinking of a kind of "include" di= rective that refers to the files where stuff has been moved. Example: The package P in the current state contains: package P is type thing is ... procedure m (value : in thing); procedure n (value : in thing; temp : in natural); end package P; package body P is: procedure m (value : in thing) is ... procedure n (value : in thing; temp : in natural) is ... end package body P; >From inside package P the procedure n can be called which is fine so far. Now I want to take out procedure n and move it into package S1: package S1 is procedure n (value : in thing; temp : in natural); end package S1; package body S1 is: procedure n (value : in thing; temp : in natural) is ... end package body S1; Now procedure n must be visible from inside package P. How can I accomplish= that ? I played with child units but did not get what I wanted. The parent= P unit must see the procedures and functions of the child units P.S1, P.S2= , ... but the compiler complains that procedure n is not defined for type t= hing in P. Thanks for your help in advance.