Your Date
package has no generic parameters, so there's probably no point in making it generic.
If you drop the GENERIC
keyword, it will likely work (I haven't actually tried it myself).
If you really do want it to be generic, then you'll need to instantiate it before you can use it. Date
is not a package; it's a generic package.
generic
package Date is
...
end Date;
package MyDate is new Date;
Now MyDate
is a (non-generic) package, and you can refer to MyDate.DateRec
.
By making it generic with no generic parameters, you can create multiple instantiations, each of which is a distinct package, so that MyDate.DateRec
and YourDate.DateRec
are distinct types. It's not clear that that's worthwhile.
Normally a generic package has one or more parameters, so that different instances operate on different types. You even have examples of that in your code: Ada.Text_IO.Enumeration_IO
is generic, and your MonthNameIO
is a specific instance of that generic package.