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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,63ed09fc54092c73 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.66.84.136 with SMTP id z8mr1632485pay.2.1359743466685; Fri, 01 Feb 2013 10:31:06 -0800 (PST) X-Received: by 10.50.195.138 with SMTP id ie10mr276447igc.16.1359743466639; Fri, 01 Feb 2013 10:31:06 -0800 (PST) Path: 6ni27960pbd.1!nntp.google.com!ld4no13027252pbb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 1 Feb 2013 10:31:06 -0800 (PST) In-Reply-To: <5ab43474-0ce2-425c-836b-ff4c97587958@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=114.145.182.181; posting-account=Mi71UQoAAACnFhXo1NVxPlurinchtkIj NNTP-Posting-Host: 114.145.182.181 References: <6d66d1c4-ed22-446b-a9d7-dc806ae1ef8f@googlegroups.com> <5ab43474-0ce2-425c-836b-ff4c97587958@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <8f7b509f-c92d-48b0-8322-cdc48baf4846@googlegroups.com> Subject: Re: When is a rename not a rename? From: ytomino Injection-Date: Fri, 01 Feb 2013 18:31:06 +0000 Content-Type: text/plain; charset=ISO-8859-1 Date: 2013-02-01T10:31:06-08:00 List-Id: How is my previous post? First, package XXX is type T is private; function "=" (Left, Right : T) return Boolean; end XXX; declare use XXX; use type T; A, B : T; begin if A = B then -- legal Then, ready new package YYY renaming XXX. with XXX; package YYY is subtype T is XXX.T; function "=" (Left, Right : T) return Boolean renames XXX."="; end YYY; And, replace. declare use YYY; -- change here use type T; A, B : T; begin if A = B then -- error !! I want to split an existing package into some implementation files and one interface file that renames all declarations in each implementation file. For example, from package Large is type T1 is private; procedure Proc1 (Obj : T1); type T1_Supplement is private; procedure Proc2 (Obj : T1; Arg : T1_Supplement); ... type T2; ... end Large; to with Small1, Small2; package Large is subtype T1 is Small1.T1; procedure Proc1 (Obj : T1) renames Small1.Proc1; subtype T1_Supplement is Small1.T1_Supplement; procedure Primitive (Obj : T1; Arg : T1_Supplement) renamens Small1.Proc2; ... renames all entities from Small1 ... subtype T2 is Small2.T2; ... renames all entities from Small2 ... end Large; But, "use type" causes above confliction. ("type T1 is new Small1.T1;" resolves for only T1, but T1_Supplement should be renamed still.)