title: extending a tagged private type in the ada language
body: <p>I want to add a procedure to my instantiation of the Ada.Containers.Doubly_Linked_Lists that will print out the list. I also would like to hide some of the functions and procedures. If there is a better way, I would be happy to read it, but for now, I am trying to wrap the instantiation inside another package, and that means creating a new List and Cursor. The generic define them like this:</p>
  
  <pre><code>   type List is tagged private;
     pragma Preelaborable_Initialization(List);
     type Cursor is private;
     pragma Preelaborable_Initialization(Cursor);
  </code></pre>
  
  <p>I've tried </p>
  
  <pre><code>  package Collection is new Ada.Containers.Doubly_Linked_Lists (New_Type);
     type Cursor is new Collection.Cursor;
     type List is new tagged Collection.List with private;
  </code></pre>
  
  <p>This seems to be working for Cursor, but List is causing <code>subtype indication expected</code> error. </p>
  
  <p>How can I subtype a tagged private like List?</p>