In fact you can have separate
bodies for packages, protected and task types, as well as subprograms.
So you could say
package Large is
procedure A;
procedure B;
end Large;
package body Large is
package Implementation is
procedure A;
procedure B;
end Implementation;
package body Implementation is separate;
procedure A renames Implementation.A;
procedure B renames Implementation.B;
end Large;
with Ada.Text_IO; use Ada.Text_IO;
separate (Large)
package body Implementation is
procedure A is
begin
Put_Line ("large.implementation.a");
end A;
procedure B is
begin
Put_Line ("large.implementation.b");
end B;
end Implementation;
and to check
with Large;
procedure Check_Separate_Implementation is
begin
Large.A;
Large.B;
end Check_Separate_Implementation;
Equally, you could have Implementation
as a child package:
private package Large.Implementation is
procedure A;
procedure B;
end Large.Implementation;
with Large.Implementation;
package body Large is
procedure A renames Implementation.A;
procedure B renames Implementation.B;
end Large;
The only difference I can see is that other child packages of Large
would be able to see Implementation
in the child package version but not in the separate version.
The Program Structure section of the Ada Style Guide (2005 edition) strongly prefers use of child packages rather than subunits, and says (in answer to your style question)
In preference to nesting in a package body, use a private child and with it to the parent body.
but, as you might expect, opinions will differ on this. You could read the Rationale section of the Guide and see how it fits your particular situation.