title: List nodes in Ada
body: <p>So I'm writing a linked list in Ada - a pretty simple task. In the list.ads file, I declare a list node like so:</p>
  
  <pre><code>type Node;
  type Node_Ptr is access Node;
  
  type Node is record
    Data: Integer;
    Next: Node_Ptr;
  end record;
  </code></pre>
  
  <p>In the adb file, I declare the head node as a sentinel:</p>
  
  <pre><code>Head: Node_Ptr := new Node_Ptr'(null, null);
  </code></pre>
  
  <p>From what I've read and seen, this should work. However, when I try to compile, it tells me that "expected type Node declared in list.ads", even though I already defined the type. Weirdly enough, it tells me that Node_Ptr is appropriately defined, but Node is not. What gives?</p>