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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3849a7e484f56749 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-09 06:41:01 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!opentransit.net!jussieu.fr!cnam.fr!not-for-mail From: Sami Evangelista Newsgroups: comp.lang.ada Subject: Re: generic packages Date: Tue, 09 Jul 2002 15:41:45 +0200 Organization: Conservatoire National des Arts et Metiers Message-ID: <3D2AE819.90000@wanadoo.fr> References: <3D2ADF27.8070502@wanadoo.fr> <3D2AE4E9.3020208@laas.fr> NNTP-Posting-Host: lmi14.cnam.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: kelvin.cnam.fr 1026222008 15508 163.173.228.14 (9 Jul 2002 13:40:08 GMT) X-Complaints-To: usenet@news.cnam.fr NNTP-Posting-Date: 9 Jul 2002 13:40:08 GMT User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20011126 Netscape6/6.2.1 X-Accept-Language: en-us Xref: archiver1.google.com comp.lang.ada:26968 Date: 2002-07-09T13:40:08+00:00 List-Id: Fabien Garcia wrote: > Sami Evangelista wrote: > > [snip] > >> is there any solution ? >> >> thanks for any help > > I would try something like this : > > > ----------------------------------------------------------------- > generic > type Element_a is private; > type element_b is private; > with function eq_a (E1, E2 : in Element_a) return boolean; > with function eq_b (E1, E2 : in Element_b) return boolean; > with function a_to_b(A : in Element_a) return element_b; > package A_Set_To_B_set_pack is > > package a_set is new generic_set (Element_a,eq_a); > package b_set is new generic_set (Element_b,eq_b); > > function a_set_to_b_set(the_set : in a_set.set) return b_set.set; > ------------------------------------------------------------------ > Fabien Garcia > > > thank you for your response. but is it possible to declare it in the generic_set.ads file? i have tried to put a_set_to_b_set into another file but then i can't access to the private type of the generic_set package like el or others_els.