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.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FROM_STARTS_WITH_NUMS autolearn=no autolearn_force=no version=3.4.4 X-Received: by 10.36.2.212 with SMTP id 203mr7420634itu.35.1516884892463; Thu, 25 Jan 2018 04:54:52 -0800 (PST) X-Received: by 10.157.24.117 with SMTP id t50mr854512ott.9.1516884892064; Thu, 25 Jan 2018 04:54:52 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.unit0.net!peer03.am4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!w142no520440ita.0!news-out.google.com!b73ni10517ita.0!nntp.google.com!g80no520933itg.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 25 Jan 2018 04:54:51 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=85.242.255.128; posting-account=rhqvKAoAAABpikMmPHJSZh4400BboHwT NNTP-Posting-Host: 85.242.255.128 References: <1aaa851e-495a-4dd4-8db7-0fd84ee8225f@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: how to force the Small aspect of a new type derived from the generic formal type ? From: Mehdi Saada <00120260a@gmail.com> Injection-Date: Thu, 25 Jan 2018 12:54:52 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 1775 X-Received-Body-CRC: 4023252857 Xref: reader02.eternal-september.org comp.lang.ada:50141 Date: 2018-01-25T04:54:51-08:00 List-Id: > Either the teacher is asking for the impossible Actually the teacher isn't asking to do that: he asked at some point to make it generic, at and at another, to force the Small. I assumed we could do both. > you can't use most representation aspects on a type derived from a generic formal type. I understand. But with this statement: type Modele is delta <> with SMALL => MODELE'DELTA; I intend to pass a contract, so that only types whose Small is set the same as the Delta will be accepted as valid parameters. I SUPPOSED it works like this... I suppose now I was wrong ?