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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c71aef5bb0ff1a93,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-02 09:19:51 PST Date: Fri, 02 May 2003 18:19:50 +0200 From: alfonso acosta User-Agent: Mozilla/5.0 (X11; U; Linux i686; es-AR; rv:1.3) Gecko/20030327 Debian/1.3-4 X-Accept-Language: es, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: recursive types and generics Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 213.9.251.91 Message-ID: <3eb29aa6$1_3@news.arrakis.es> X-Trace: caladan.arrakis.es 1051892390 213.9.251.91 (2 May 2003 18:19:50 +0100) Organization: Arrakis Servicios y Comunicaciones SLU Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!140.99.99.194.MISMATCH!newsfeed1.easynews.com!easynews.com!easynews!news-out.nuthinbutnews.com!propagator2-sterling!in.nntp.be!caladan.arrakis.es Xref: archiver1.google.com comp.lang.ada:36868 Date: 2003-05-02T18:19:50+02:00 List-Id: Hi: I need to code a recursive type: a Sequence which could contain sequences of the same type. Im trying to use a generic package for that purpouse. I provide a simplified example: ------------------------------------------------------------------------- type Elem_Type is (Nothing, Int, Seq); type Seq_Acces; type Seq_Elem (Const : Elem_Type := Nothing) is record case Const is when Nothing => null; when Int => I : Integer; when Seq => S : Seq_Access; -- "invalid use of type before its full declaration" end case; end record; package Myseq is new Sequence (Element => Seq_Elem); type Seq_Access is access Myseq.Sequence; -- provided by the generic -- package -------------------------------------------------------------------------- Any ideas about fixing it? Alfonso Acosta