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-Thread: 103376,5f5a48f21d7f7525 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Inferring array index type from array object Date: Wed, 23 Jun 2010 20:09:24 +0100 Organization: A noiseless patient Spider Message-ID: References: <6b20ed09-efc1-4df7-90f9-5e141482e8d0@d37g2000yqm.googlegroups.com> <1305oqccr1h2t$.x33x4oxwd84d$.dlg@40tude.net> <4c21fd04$0$6769$9b4e6d93@newsspool3.arcor-online.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Wed, 23 Jun 2010 19:09:22 +0000 (UTC) Injection-Info: mx01.eternal-september.org; posting-host="KCXegvZb5vh43D+f3BR6Ew"; logging-data="5954"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19aDOxS8QdNslsjObQgFA5fUx311vjrVmY=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (darwin) Cancel-Lock: sha1:VGVRu25JHLDzjjEkSD+aYtoTUlw= sha1:Gd17rx/BsGMLE3p1CMIV41+rETI= Xref: g2news1.google.com comp.lang.ada:11900 Date: 2010-06-23T20:09:24+01:00 List-Id: "J-P. Rosen" writes: > outside the instantiation, you are supposed to know how it was > instantiated, therefore you have access to the actuals. Why would you > need to reexport the formals? Formal types, yes, not so sure about formal objects. Consider eg a generic signature package .. generic type Severity_Code is (<>); -- Messages are logged with this indication of severity. Error : Severity_Code; -- This value is used for error messages. Informational : Severity_Code; -- This value is used for informational messages. with procedure Log (Severity : Severity_Code; Message : String); package Logging_Signature is -- Make the actual instantiation parameters visible. package Exported is Error : Severity_Code renames Logging_Signature.Error; Informational : Severity_Code renames Logging_Signature.Informational; procedure Log (Severity : Severity_Code; Message : String) renames Logging_Signature.Log; end Exported;