Index: a-cdlili.ads
===================================================================
--- a-cdlili.ads	(revision 183406)
+++ a-cdlili.ads	(working copy)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2011, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
 --                                                                          --
 -- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT. The copyright notice above, and the license provisions that follow --
@@ -31,11 +31,11 @@
 -- This unit was originally developed by Matthew J Heaney.                  --
 ------------------------------------------------------------------------------
 
+with Ada.Iterator_Interfaces;
+
 private with Ada.Finalization;
+private with Ada.Streams;
 
-with Ada.Streams; use Ada.Streams;
-with Ada.Iterator_Interfaces;
-
 generic
    type Element_Type is private;
 
@@ -61,6 +61,7 @@
    Empty_List : constant List;
 
    No_Element : constant Cursor;
+
    function Has_Element (Position : Cursor) return Boolean;
 
    package List_Iterator_Interfaces is new
@@ -95,35 +96,11 @@
    with
       Implicit_Dereference => Element;
 
-   procedure Write
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : Constant_Reference_Type);
-
-   for Constant_Reference_Type'Write use Write;
-
-   procedure Read
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : out Constant_Reference_Type);
-
-   for Constant_Reference_Type'Read use Read;
-
    type Reference_Type
      (Element : not null access Element_Type) is private
    with
       Implicit_Dereference => Element;
 
-   procedure Write
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : Reference_Type);
-
-   for Reference_Type'Write use Write;
-
-   procedure Read
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : out Reference_Type);
-
-   for Reference_Type'Read use Read;
-
    function Constant_Reference
      (Container : aliased List;
       Position  : Cursor) return Constant_Reference_Type;
@@ -280,6 +257,7 @@
       end record;
 
    use Ada.Finalization;
+   use Ada.Streams;
 
    type List is
      new Controlled with record
@@ -330,9 +308,33 @@
    type Constant_Reference_Type
       (Element : not null access constant Element_Type) is null record;
 
+   procedure Write
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : Constant_Reference_Type);
+
+   for Constant_Reference_Type'Write use Write;
+
+   procedure Read
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : out Constant_Reference_Type);
+
+   for Constant_Reference_Type'Read use Read;
+
    type Reference_Type
       (Element : not null access Element_Type) is null record;
 
+   procedure Write
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : Reference_Type);
+
+   for Reference_Type'Write use Write;
+
+   procedure Read
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : out Reference_Type);
+
+   for Reference_Type'Read use Read;
+
    Empty_List : constant List := (Controlled with null, null, 0, 0, 0);
 
    No_Element : constant Cursor := Cursor'(null, null);
Index: a-cihama.ads
===================================================================
--- a-cihama.ads	(revision 183406)
+++ a-cihama.ads	(working copy)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2011, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
 --                                                                          --
 -- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT. The copyright notice above, and the license provisions that follow --
@@ -31,10 +31,11 @@
 -- This unit was originally developed by Matthew J Heaney.                  --
 ------------------------------------------------------------------------------
 
+with Ada.Iterator_Interfaces;
+
 private with Ada.Containers.Hash_Tables;
 private with Ada.Finalization;
-with Ada.Streams; use Ada.Streams;
-with Ada.Iterator_Interfaces;
+private with Ada.Streams;
 
 generic
    type Key_Type (<>) is private;
@@ -139,34 +140,10 @@
    with
       Implicit_Dereference => Element;
 
-   procedure Write
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : Constant_Reference_Type);
-
-   for Constant_Reference_Type'Write use Write;
-
-   procedure Read
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : out Constant_Reference_Type);
-
-   for Constant_Reference_Type'Read use Read;
-
    type Reference_Type (Element : not null access Element_Type) is private
    with
       Implicit_Dereference => Element;
 
-   procedure Write
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : Reference_Type);
-
-   for Reference_Type'Write use Write;
-
-   procedure Read
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : out Reference_Type);
-
-   for Reference_Type'Read use Read;
-
    function Constant_Reference
      (Container : aliased Map;
       Position  : Cursor) return Constant_Reference_Type;
@@ -346,12 +323,26 @@
       HT : HT_Types.Hash_Table_Type;
    end record;
 
+   overriding procedure Adjust   (Container : in out Map);
+
+   overriding procedure Finalize (Container : in out Map);
+
    use HT_Types;
    use Ada.Finalization;
+   use Ada.Streams;
 
-   overriding procedure Adjust   (Container : in out Map);
-   overriding procedure Finalize (Container : in out Map);
+   procedure Write
+     (Stream    : not null access Root_Stream_Type'Class;
+      Container : Map);
 
+   for Map'Write use Write;
+
+   procedure Read
+     (Stream    : not null access Root_Stream_Type'Class;
+      Container : out Map);
+
+   for Map'Read use Read;
+
    type Map_Access is access all Map;
    for Map_Access'Storage_Size use 0;
 
@@ -366,34 +357,44 @@
 
    for Cursor'Write use Write;
 
+   procedure Read
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : out Cursor);
+
+   for Cursor'Read use Read;
+
    type Constant_Reference_Type
       (Element : not null access constant Element_Type) is null record;
 
-   type Reference_Type
-      (Element : not null access Element_Type) is null record;
+   procedure Write
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : Constant_Reference_Type);
 
+   for Constant_Reference_Type'Write use Write;
+
    procedure Read
      (Stream : not null access Root_Stream_Type'Class;
-      Item   : out Cursor);
+      Item   : out Constant_Reference_Type);
 
-   for Cursor'Read use Read;
+   for Constant_Reference_Type'Read use Read;
 
-   No_Element : constant Cursor :=
-     (Container => null,
-      Node      => null);
+   type Reference_Type
+      (Element : not null access Element_Type) is null record;
 
    procedure Write
-     (Stream    : not null access Root_Stream_Type'Class;
-      Container : Map);
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : Reference_Type);
 
-   for Map'Write use Write;
+   for Reference_Type'Write use Write;
 
    procedure Read
-     (Stream    : not null access Root_Stream_Type'Class;
-      Container : out Map);
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : out Reference_Type);
 
-   for Map'Read use Read;
+   for Reference_Type'Read use Read;
 
    Empty_Map : constant Map := (Controlled with HT => (null, 0, 0, 0));
 
+   No_Element : constant Cursor := (Container => null, Node => null);
+
 end Ada.Containers.Indefinite_Hashed_Maps;
Index: a-coinve.ads
===================================================================
--- a-coinve.ads	(revision 183406)
+++ a-coinve.ads	(working copy)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2011, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
 --                                                                          --
 -- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT. The copyright notice above, and the license provisions that follow --
@@ -31,11 +31,11 @@
 -- This unit was originally developed by Matthew J Heaney.                  --
 ------------------------------------------------------------------------------
 
+with Ada.Iterator_Interfaces;
+
 private with Ada.Finalization;
+private with Ada.Streams;
 
-with Ada.Streams; use Ada.Streams;
-with Ada.Iterator_Interfaces;
-
 generic
    type Index_Type is range <>;
    type Element_Type (<>) is private;
@@ -67,20 +67,9 @@
    Empty_Vector : constant Vector;
 
    No_Element : constant Cursor;
+
    function Has_Element (Position : Cursor) return Boolean;
 
-   procedure Read
-     (Stream   : not null access Root_Stream_Type'Class;
-      Position : out Cursor);
-
-   for Cursor'Read use Read;
-
-   procedure Write
-     (Stream   : not null access Root_Stream_Type'Class;
-      Position : Cursor);
-
-   for Cursor'Write use Write;
-
    package Vector_Iterator_Interfaces is new
      Ada.Iterator_Interfaces (Cursor, Has_Element);
 
@@ -121,34 +110,10 @@
    with
       Implicit_Dereference => Element;
 
-   procedure Write
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : Constant_Reference_Type);
-
-   for Constant_Reference_Type'Write use Write;
-
-   procedure Read
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : out Constant_Reference_Type);
-
-   for Constant_Reference_Type'Read use Read;
-
    type Reference_Type (Element : not null access Element_Type) is private
    with
       Implicit_Dereference => Element;
 
-   procedure Write
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : Reference_Type);
-
-   for Reference_Type'Write use Write;
-
-   procedure Read
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : out Reference_Type);
-
-   for Reference_Type'Read use Read;
-
    function Constant_Reference
      (Container : aliased Vector;
       Position  : Cursor) return Constant_Reference_Type;
@@ -397,25 +362,20 @@
 
    type Elements_Access is access Elements_Type;
 
-   use Ada.Finalization;
-
-   type Vector is new Controlled with record
+   type Vector is new Ada.Finalization.Controlled with record
       Elements : Elements_Access;
       Last     : Extended_Index := No_Index;
       Busy     : Natural := 0;
       Lock     : Natural := 0;
    end record;
 
-   type Constant_Reference_Type
-     (Element : not null access constant Element_Type) is null record;
-
-   type Reference_Type
-     (Element : not null access Element_Type) is null record;
-
    overriding procedure Adjust (Container : in out Vector);
 
    overriding procedure Finalize (Container : in out Vector);
 
+   use Ada.Finalization;
+   use Ada.Streams;
+
    procedure Write
      (Stream    : not null access Root_Stream_Type'Class;
       Container : Vector);
@@ -436,6 +396,48 @@
       Index     : Index_Type := Index_Type'First;
    end record;
 
+   procedure Read
+     (Stream   : not null access Root_Stream_Type'Class;
+      Position : out Cursor);
+
+   for Cursor'Read use Read;
+
+   procedure Write
+     (Stream   : not null access Root_Stream_Type'Class;
+      Position : Cursor);
+
+   for Cursor'Write use Write;
+
+   type Constant_Reference_Type
+     (Element : not null access constant Element_Type) is null record;
+
+   procedure Write
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : Constant_Reference_Type);
+
+   for Constant_Reference_Type'Write use Write;
+
+   procedure Read
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : out Constant_Reference_Type);
+
+   for Constant_Reference_Type'Read use Read;
+
+   type Reference_Type
+     (Element : not null access Element_Type) is null record;
+
+   procedure Write
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : Reference_Type);
+
+   for Reference_Type'Write use Write;
+
+   procedure Read
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : out Reference_Type);
+
+   for Reference_Type'Read use Read;
+
    Empty_Vector : constant Vector := (Controlled with null, No_Index, 0, 0);
 
    No_Element : constant Cursor := Cursor'(null, Index_Type'First);
Index: a-ciorse.ads
===================================================================
--- a-ciorse.ads	(revision 183406)
+++ a-ciorse.ads	(working copy)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2011, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
 --                                                                          --
 -- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT. The copyright notice above, and the license provisions that follow --
@@ -31,10 +31,11 @@
 -- This unit was originally developed by Matthew J Heaney.                  --
 ------------------------------------------------------------------------------
 
+with Ada.Iterator_Interfaces;
+
 private with Ada.Containers.Red_Black_Trees;
 private with Ada.Finalization;
-with Ada.Streams; use Ada.Streams;
-with Ada.Iterator_Interfaces;
+private with Ada.Streams;
 
 generic
    type Element_Type (<>) is private;
@@ -99,18 +100,6 @@
      (Container : aliased Set;
       Position  : Cursor) return Constant_Reference_Type;
 
-   procedure Read
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : out Constant_Reference_Type);
-
-   for Constant_Reference_Type'Read use Read;
-
-   procedure Write
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : Constant_Reference_Type);
-
-   for Constant_Reference_Type'Write use Write;
-
    procedure Assign (Target : in out Set; Source : Set);
 
    function Copy (Source : Set) return Set;
@@ -306,6 +295,8 @@
       type Reference_Type
          (Element : not null access Element_Type) is null record;
 
+      use Ada.Streams;
+
       procedure Write
         (Stream : not null access Root_Stream_Type'Class;
          Item   : Reference_Type);
@@ -351,7 +342,20 @@
    use Red_Black_Trees;
    use Tree_Types;
    use Ada.Finalization;
+   use Ada.Streams;
 
+   procedure Write
+     (Stream    : not null access Root_Stream_Type'Class;
+      Container : Set);
+
+   for Set'Write use Write;
+
+   procedure Read
+     (Stream    : not null access Root_Stream_Type'Class;
+      Container : out Set);
+
+   for Set'Read use Read;
+
    type Set_Access is access all Set;
    for Set_Access'Storage_Size use 0;
 
@@ -372,23 +376,21 @@
 
    for Cursor'Read use Read;
 
-   No_Element : constant Cursor := Cursor'(null, null);
+   type Constant_Reference_Type
+      (Element : not null access constant Element_Type) is null record;
 
-   procedure Write
-     (Stream    : not null access Root_Stream_Type'Class;
-      Container : Set);
+   procedure Read
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : out Constant_Reference_Type);
 
-   for Set'Write use Write;
+   for Constant_Reference_Type'Read use Read;
 
-   procedure Read
-     (Stream    : not null access Root_Stream_Type'Class;
-      Container : out Set);
+   procedure Write
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : Constant_Reference_Type);
 
-   for Set'Read use Read;
+   for Constant_Reference_Type'Write use Write;
 
-   type Constant_Reference_Type
-      (Element : not null access constant Element_Type) is null record;
-
    Empty_Set : constant Set :=
                  (Controlled with Tree => (First  => null,
                                            Last   => null,
@@ -397,4 +399,6 @@
                                            Busy   => 0,
                                            Lock   => 0));
 
+   No_Element : constant Cursor := Cursor'(null, null);
+
 end Ada.Containers.Indefinite_Ordered_Sets;
Index: a-coorma.ads
===================================================================
--- a-coorma.ads	(revision 183406)
+++ a-coorma.ads	(working copy)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2011, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
 --                                                                          --
 -- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT. The copyright notice above, and the license provisions that follow --
@@ -31,12 +31,12 @@
 -- This unit was originally developed by Matthew J Heaney.                  --
 ------------------------------------------------------------------------------
 
+with Ada.Iterator_Interfaces;
+
 private with Ada.Containers.Red_Black_Trees;
 private with Ada.Finalization;
+private with Ada.Streams;
 
-with Ada.Streams; use Ada.Streams;
-with Ada.Iterator_Interfaces;
-
 generic
    type Key_Type is private;
    type Element_Type is private;
@@ -259,7 +259,20 @@
    use Red_Black_Trees;
    use Tree_Types;
    use Ada.Finalization;
+   use Ada.Streams;
 
+   procedure Write
+     (Stream    : not null access Root_Stream_Type'Class;
+      Container : Map);
+
+   for Map'Write use Write;
+
+   procedure Read
+     (Stream    : not null access Root_Stream_Type'Class;
+      Container : out Map);
+
+   for Map'Read use Read;
+
    type Map_Access is access all Map;
    for Map_Access'Storage_Size use 0;
 
@@ -280,23 +293,21 @@
 
    for Cursor'Read use Read;
 
-   No_Element : constant Cursor := Cursor'(null, null);
+   type Constant_Reference_Type
+      (Element : not null access constant Element_Type) is null record;
 
-   procedure Write
-     (Stream    : not null access Root_Stream_Type'Class;
-      Container : Map);
+   procedure Read
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : out Constant_Reference_Type);
 
-   for Map'Write use Write;
+   for Constant_Reference_Type'Read use Read;
 
-   procedure Read
-     (Stream    : not null access Root_Stream_Type'Class;
-      Container : out Map);
+   procedure Write
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : Constant_Reference_Type);
 
-   for Map'Read use Read;
+   for Constant_Reference_Type'Write use Write;
 
-   type Constant_Reference_Type
-      (Element : not null access constant Element_Type) is null record;
-
    type Reference_Type
       (Element : not null access Element_Type) is null record;
 
@@ -312,18 +323,6 @@
 
    for Reference_Type'Write use Write;
 
-   procedure Read
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : out Constant_Reference_Type);
-
-   for Constant_Reference_Type'Read use Read;
-
-   procedure Write
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : Constant_Reference_Type);
-
-   for Constant_Reference_Type'Write use Write;
-
    Empty_Map : constant Map :=
                  (Controlled with Tree => (First  => null,
                                            Last   => null,
@@ -331,4 +330,7 @@
                                            Length => 0,
                                            Busy   => 0,
                                            Lock   => 0));
+
+   No_Element : constant Cursor := Cursor'(null, null);
+
 end Ada.Containers.Ordered_Maps;
Index: a-cborma.ads
===================================================================
--- a-cborma.ads	(revision 183406)
+++ a-cborma.ads	(working copy)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2011, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
 --                                                                          --
 -- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT. The copyright notice above, and the license provisions that follow --
@@ -31,11 +31,11 @@
 -- This unit was originally developed by Matthew J Heaney.                  --
 ------------------------------------------------------------------------------
 
+with Ada.Iterator_Interfaces;
+
 private with Ada.Containers.Red_Black_Trees;
+private with Ada.Streams;
 
-with Ada.Streams; use Ada.Streams;
-with Ada.Iterator_Interfaces;
-
 generic
    type Key_Type is private;
    type Element_Type is private;
@@ -102,34 +102,10 @@
    with
       Implicit_Dereference => Element;
 
-   procedure Read
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : out Constant_Reference_Type);
-
-   for Constant_Reference_Type'Read use Read;
-
-   procedure Write
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : Constant_Reference_Type);
-
-   for Constant_Reference_Type'Write use Write;
-
    type Reference_Type (Element : not null access Element_Type) is private
    with
       Implicit_Dereference => Element;
 
-   procedure Read
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : out Reference_Type);
-
-   for Reference_Type'Read use Read;
-
-   procedure Write
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : Reference_Type);
-
-   for Reference_Type'Write use Write;
-
    function Constant_Reference
      (Container : aliased Map;
       Position  : Cursor) return Constant_Reference_Type;
@@ -269,12 +245,25 @@
    type Map (Capacity : Count_Type) is
      new Tree_Types.Tree_Type (Capacity) with null record;
 
+   use Red_Black_Trees;
+   use Tree_Types;
+   use Ada.Streams;
+
+   procedure Write
+     (Stream    : not null access Root_Stream_Type'Class;
+      Container : Map);
+
+   for Map'Write use Write;
+
+   procedure Read
+     (Stream    : not null access Root_Stream_Type'Class;
+      Container : out Map);
+
+   for Map'Read use Read;
+
    type Map_Access is access all Map;
    for Map_Access'Storage_Size use 0;
 
-   use Red_Black_Trees;
-   use Tree_Types;
-
    type Cursor is record
       Container : Map_Access;
       Node      : Count_Type := 0;
@@ -292,26 +281,38 @@
 
    for Cursor'Read use Read;
 
-   No_Element : constant Cursor := Cursor'(null, 0);
+   type Constant_Reference_Type
+      (Element : not null access constant Element_Type) is null record;
 
+   procedure Read
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : out Constant_Reference_Type);
+
+   for Constant_Reference_Type'Read use Read;
+
    procedure Write
-     (Stream    : not null access Root_Stream_Type'Class;
-      Container : Map);
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : Constant_Reference_Type);
 
-   for Map'Write use Write;
+   for Constant_Reference_Type'Write use Write;
 
+   type Reference_Type
+      (Element : not null access Element_Type) is null record;
+
    procedure Read
-     (Stream    : not null access Root_Stream_Type'Class;
-      Container : out Map);
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : out Reference_Type);
 
-   for Map'Read use Read;
+   for Reference_Type'Read use Read;
 
-   type Constant_Reference_Type
-      (Element : not null access constant Element_Type) is null record;
+   procedure Write
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : Reference_Type);
 
-   type Reference_Type
-      (Element : not null access Element_Type) is null record;
+   for Reference_Type'Write use Write;
 
    Empty_Map : constant Map := Map'(Tree_Type with Capacity => 0);
 
+   No_Element : constant Cursor := Cursor'(null, 0);
+
 end Ada.Containers.Bounded_Ordered_Maps;
Index: a-cidlli.ads
===================================================================
--- a-cidlli.ads	(revision 183406)
+++ a-cidlli.ads	(working copy)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2011, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
 --                                                                          --
 -- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT. The copyright notice above, and the license provisions that follow --
@@ -32,9 +32,9 @@
 ------------------------------------------------------------------------------
 
 with Ada.Iterator_Interfaces;
-with Ada.Streams;             use Ada.Streams;
 
 private with Ada.Finalization;
+private with Ada.Streams;
 
 generic
    type Element_Type (<>) is private;
@@ -95,35 +95,11 @@
    with
       Implicit_Dereference => Element;
 
-   procedure Write
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : Constant_Reference_Type);
-
-   for Constant_Reference_Type'Write use Write;
-
-   procedure Read
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : out Constant_Reference_Type);
-
-   for Constant_Reference_Type'Read use Read;
-
    type Reference_Type
      (Element : not null access Element_Type) is private
    with
       Implicit_Dereference => Element;
 
-   procedure Write
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : Reference_Type);
-
-   for Reference_Type'Write use Write;
-
-   procedure Read
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : out Reference_Type);
-
-   for Reference_Type'Read use Read;
-
    function Constant_Reference
      (Container : aliased List;
       Position  : Cursor) return Constant_Reference_Type;
@@ -275,6 +251,7 @@
       end record;
 
    use Ada.Finalization;
+   use Ada.Streams;
 
    type List is
      new Controlled with record
@@ -285,12 +262,6 @@
         Lock   : Natural := 0;
      end record;
 
-   type Constant_Reference_Type
-      (Element : not null access constant Element_Type) is null record;
-
-   type Reference_Type
-      (Element : not null access Element_Type) is null record;
-
    overriding procedure Adjust (Container : in out List);
 
    overriding procedure Finalize (Container : in out List) renames Clear;
@@ -328,6 +299,36 @@
 
    for Cursor'Write use Write;
 
+   type Constant_Reference_Type
+      (Element : not null access constant Element_Type) is null record;
+
+   procedure Write
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : Constant_Reference_Type);
+
+   for Constant_Reference_Type'Write use Write;
+
+   procedure Read
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : out Constant_Reference_Type);
+
+   for Constant_Reference_Type'Read use Read;
+
+   type Reference_Type
+      (Element : not null access Element_Type) is null record;
+
+   procedure Write
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : Reference_Type);
+
+   for Reference_Type'Write use Write;
+
+   procedure Read
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : out Reference_Type);
+
+   for Reference_Type'Read use Read;
+
    Empty_List : constant List := List'(Controlled with null, null, 0, 0, 0);
 
    No_Element : constant Cursor := Cursor'(null, null);
Index: a-cihase.ads
===================================================================
--- a-cihase.ads	(revision 183406)
+++ a-cihase.ads	(working copy)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2011, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
 --                                                                          --
 -- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT. The copyright notice above, and the license provisions that follow --
@@ -32,6 +32,7 @@
 ------------------------------------------------------------------------------
 
 with Ada.Iterator_Interfaces;
+
 private with Ada.Containers.Hash_Tables;
 private with Ada.Streams;
 private with Ada.Finalization;
@@ -474,6 +475,18 @@
    use Ada.Finalization;
    use Ada.Streams;
 
+   procedure Write
+     (Stream    : not null access Root_Stream_Type'Class;
+      Container : Set);
+
+   for Set'Write use Write;
+
+   procedure Read
+     (Stream    : not null access Root_Stream_Type'Class;
+      Container : out Set);
+
+   for Set'Read use Read;
+
    type Set_Access is access all Set;
    for Set_Access'Storage_Size use 0;
 
@@ -494,20 +507,6 @@
 
    for Cursor'Read use Read;
 
-   No_Element : constant Cursor := (Container => null, Node => null);
-
-   procedure Write
-     (Stream    : not null access Root_Stream_Type'Class;
-      Container : Set);
-
-   for Set'Write use Write;
-
-   procedure Read
-     (Stream    : not null access Root_Stream_Type'Class;
-      Container : out Set);
-
-   for Set'Read use Read;
-
    type Constant_Reference_Type
      (Element : not null access constant Element_Type) is null record;
 
@@ -525,4 +524,6 @@
 
    Empty_Set : constant Set := (Controlled with HT => (null, 0, 0, 0));
 
+   No_Element : constant Cursor := (Container => null, Node => null);
+
 end Ada.Containers.Indefinite_Hashed_Sets;
Index: a-cohama.ads
===================================================================
--- a-cohama.ads	(revision 183406)
+++ a-cohama.ads	(working copy)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2011, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
 --                                                                          --
 -- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT. The copyright notice above, and the license provisions that follow --
@@ -31,12 +31,12 @@
 -- This unit was originally developed by Matthew J Heaney.                  --
 ------------------------------------------------------------------------------
 
+with Ada.Iterator_Interfaces;
+
 private with Ada.Containers.Hash_Tables;
 private with Ada.Finalization;
+private with Ada.Streams;
 
-with Ada.Streams; use Ada.Streams;
-with Ada.Iterator_Interfaces;
-
 generic
    type Key_Type is private;
    type Element_Type is private;
@@ -61,18 +61,6 @@
    type Cursor is private;
    pragma Preelaborable_Initialization (Cursor);
 
-   procedure Read
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : out Cursor);
-
-   for Cursor'Read use Read;
-
-   procedure Write
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : Cursor);
-
-   for Cursor'Write use Write;
-
    Empty_Map : constant Map;
    --  Map objects declared without an initialization expression are
    --  initialized to the value Empty_Map.
@@ -153,34 +141,10 @@
    with
       Implicit_Dereference => Element;
 
-   procedure Write
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : Constant_Reference_Type);
-
-   for Constant_Reference_Type'Write use Write;
-
-   procedure Read
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : out Constant_Reference_Type);
-
-   for Constant_Reference_Type'Read use Read;
-
    type Reference_Type (Element : not null access Element_Type) is private
    with
       Implicit_Dereference => Element;
 
-   procedure Write
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : Reference_Type);
-
-   for Reference_Type'Write use Write;
-
-   procedure Read
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : out Reference_Type);
-
-   for Reference_Type'Read use Read;
-
    function Constant_Reference
      (Container : aliased Map;
       Position  : Cursor) return Constant_Reference_Type;
@@ -365,13 +329,14 @@
       HT : HT_Types.Hash_Table_Type;
    end record;
 
-   use HT_Types;
-   use Ada.Finalization;
-
    overriding procedure Adjust (Container : in out Map);
 
    overriding procedure Finalize (Container : in out Map);
 
+   use HT_Types;
+   use Ada.Finalization;
+   use Ada.Streams;
+
    procedure Write
      (Stream    : not null access Root_Stream_Type'Class;
       Container : Map);
@@ -392,12 +357,48 @@
       Node      : Node_Access;
    end record;
 
+   procedure Read
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : out Cursor);
+
+   for Cursor'Read use Read;
+
+   procedure Write
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : Cursor);
+
+   for Cursor'Write use Write;
+
    type Constant_Reference_Type
       (Element : not null access constant Element_Type) is null record;
 
+   procedure Write
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : Constant_Reference_Type);
+
+   for Constant_Reference_Type'Write use Write;
+
+   procedure Read
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : out Constant_Reference_Type);
+
+   for Constant_Reference_Type'Read use Read;
+
    type Reference_Type
       (Element : not null access Element_Type) is null record;
 
+   procedure Write
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : Reference_Type);
+
+   for Reference_Type'Write use Write;
+
+   procedure Read
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : out Reference_Type);
+
+   for Reference_Type'Read use Read;
+
    Empty_Map : constant Map := (Controlled with HT => (null, 0, 0, 0));
 
    No_Element : constant Cursor := (Container => null, Node => null);
Index: a-coorse.ads
===================================================================
--- a-coorse.ads	(revision 183406)
+++ a-coorse.ads	(working copy)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2011, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
 --                                                                          --
 -- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT. The copyright notice above, and the license provisions that follow --
@@ -31,12 +31,12 @@
 -- This unit was originally developed by Matthew J Heaney.                  --
 ------------------------------------------------------------------------------
 
+with Ada.Iterator_Interfaces;
+
 private with Ada.Containers.Red_Black_Trees;
 private with Ada.Finalization;
+private with Ada.Streams;
 
-with Ada.Streams; use Ada.Streams;
-with Ada.Iterator_Interfaces;
-
 generic
    type Element_Type is private;
 
@@ -97,22 +97,10 @@
    with
       Implicit_Dereference => Element;
 
-   procedure Write
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : Constant_Reference_Type);
-
-   for Constant_Reference_Type'Write use Write;
-
    function Constant_Reference
      (Container : aliased Set;
       Position  : Cursor) return Constant_Reference_Type;
 
-   procedure Read
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : out Constant_Reference_Type);
-
-   for Constant_Reference_Type'Read use Read;
-
    procedure Assign (Target : in out Set; Source : Set);
 
    function Copy (Source : Set) return Set;
@@ -292,6 +280,8 @@
       type Reference_Type
          (Element : not null access Element_Type) is null record;
 
+      use Ada.Streams;
+
       procedure Write
         (Stream : not null access Root_Stream_Type'Class;
          Item   : Reference_Type);
@@ -335,7 +325,20 @@
    use Red_Black_Trees;
    use Tree_Types;
    use Ada.Finalization;
+   use Ada.Streams;
 
+   procedure Write
+     (Stream    : not null access Root_Stream_Type'Class;
+      Container : Set);
+
+   for Set'Write use Write;
+
+   procedure Read
+     (Stream    : not null access Root_Stream_Type'Class;
+      Container : out Set);
+
+   for Set'Read use Read;
+
    type Set_Access is access all Set;
    for Set_Access'Storage_Size use 0;
 
@@ -356,23 +359,21 @@
 
    for Cursor'Read use Read;
 
-   No_Element : constant Cursor := Cursor'(null, null);
+   type Constant_Reference_Type
+      (Element : not null access constant Element_Type) is null record;
 
    procedure Write
-     (Stream    : not null access Root_Stream_Type'Class;
-      Container : Set);
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : Constant_Reference_Type);
 
-   for Set'Write use Write;
+   for Constant_Reference_Type'Write use Write;
 
    procedure Read
-     (Stream    : not null access Root_Stream_Type'Class;
-      Container : out Set);
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : out Constant_Reference_Type);
 
-   for Set'Read use Read;
+   for Constant_Reference_Type'Read use Read;
 
-   type Constant_Reference_Type
-      (Element : not null access constant Element_Type) is null record;
-
    Empty_Set : constant Set :=
                  (Controlled with Tree => (First  => null,
                                            Last   => null,
@@ -381,4 +382,6 @@
                                            Busy   => 0,
                                            Lock   => 0));
 
+   No_Element : constant Cursor := Cursor'(null, null);
+
 end Ada.Containers.Ordered_Sets;
Index: a-cbhama.ads
===================================================================
--- a-cbhama.ads	(revision 183406)
+++ a-cbhama.ads	(working copy)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2011, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
 --                                                                          --
 -- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT. The copyright notice above, and the license provisions that follow --
@@ -31,11 +31,11 @@
 -- This unit was originally developed by Matthew J Heaney.                  --
 ------------------------------------------------------------------------------
 
+with Ada.Iterator_Interfaces;
+
 private with Ada.Containers.Hash_Tables;
+private with Ada.Streams;
 
-with Ada.Streams; use Ada.Streams;
-with Ada.Iterator_Interfaces;
-
 generic
    type Key_Type is private;
    type Element_Type is private;
@@ -140,34 +140,10 @@
    with
       Implicit_Dereference => Element;
 
-   procedure Write
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : Constant_Reference_Type);
-
-   for Constant_Reference_Type'Write use Write;
-
-   procedure Read
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : out Constant_Reference_Type);
-
-   for Constant_Reference_Type'Read use Read;
-
    type Reference_Type (Element : not null access Element_Type) is private
    with
       Implicit_Dereference => Element;
 
-   procedure Write
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : Reference_Type);
-
-   for Reference_Type'Write use Write;
-
-   procedure Read
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : out Reference_Type);
-
-   for Reference_Type'Read use Read;
-
    function Constant_Reference
      (Container : aliased Map;
       Position  : Cursor) return Constant_Reference_Type;
@@ -362,6 +338,7 @@
       new HT_Types.Hash_Table_Type (Capacity, Modulus) with null record;
 
    use HT_Types;
+   use Ada.Streams;
 
    procedure Write
      (Stream    : not null access Root_Stream_Type'Class;
@@ -404,12 +381,36 @@
    type Constant_Reference_Type
       (Element : not null access constant Element_Type) is null record;
 
+   procedure Write
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : Constant_Reference_Type);
+
+   for Constant_Reference_Type'Write use Write;
+
+   procedure Read
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : out Constant_Reference_Type);
+
+   for Constant_Reference_Type'Read use Read;
+
    type Reference_Type
       (Element : not null access Element_Type) is null record;
 
-   No_Element : constant Cursor := (Container => null, Node => 0);
+   procedure Write
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : Reference_Type);
 
+   for Reference_Type'Write use Write;
+
+   procedure Read
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : out Reference_Type);
+
+   for Reference_Type'Read use Read;
+
    Empty_Map : constant Map :=
      (Hash_Table_Type with Capacity => 0, Modulus => 0);
 
+   No_Element : constant Cursor := (Container => null, Node => 0);
+
 end Ada.Containers.Bounded_Hashed_Maps;
Index: a-cborse.ads
===================================================================
--- a-cborse.ads	(revision 183406)
+++ a-cborse.ads	(working copy)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2011, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
 --                                                                          --
 -- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT. The copyright notice above, and the license provisions that follow --
@@ -31,10 +31,11 @@
 -- This unit was originally developed by Matthew J Heaney.                  --
 ------------------------------------------------------------------------------
 
-private with Ada.Containers.Red_Black_Trees;
-with Ada.Streams; use Ada.Streams;
 with Ada.Iterator_Interfaces;
 
+private with Ada.Containers.Red_Black_Trees;
+private with Ada.Streams;
+
 generic
    type Element_Type is private;
 
@@ -60,6 +61,7 @@
    Empty_Set : constant Set;
 
    No_Element : constant Cursor;
+
    function Has_Element (Position : Cursor) return Boolean;
 
    package Set_Iterator_Interfaces is new
@@ -277,6 +279,8 @@
       type Reference_Type
          (Element : not null access Element_Type) is null record;
 
+      use Ada.Streams;
+
       procedure Read
         (Stream : not null access Root_Stream_Type'Class;
          Item   : out Reference_Type);
@@ -310,6 +314,21 @@
    type Set (Capacity : Count_Type) is
      new Tree_Types.Tree_Type (Capacity) with null record;
 
+   use Tree_Types;
+   use Ada.Streams;
+
+   procedure Write
+     (Stream    : not null access Root_Stream_Type'Class;
+      Container : Set);
+
+   for Set'Write use Write;
+
+   procedure Read
+     (Stream    : not null access Root_Stream_Type'Class;
+      Container : out Set);
+
+   for Set'Read use Read;
+
    type Set_Access is access all Set;
    for Set_Access'Storage_Size use 0;
 
@@ -324,8 +343,6 @@
       Node      : Count_Type := 0;
    end record;
 
-   use Tree_Types;
-
    procedure Write
      (Stream : not null access Root_Stream_Type'Class;
       Item   : Cursor);
@@ -338,20 +355,6 @@
 
    for Cursor'Read use Read;
 
-   No_Element : constant Cursor := Cursor'(null, 0);
-
-   procedure Write
-     (Stream    : not null access Root_Stream_Type'Class;
-      Container : Set);
-
-   for Set'Write use Write;
-
-   procedure Read
-     (Stream    : not null access Root_Stream_Type'Class;
-      Container : out Set);
-
-   for Set'Read use Read;
-
    type Constant_Reference_Type
       (Element : not null access constant Element_Type) is null record;
 
@@ -369,4 +372,6 @@
 
    Empty_Set : constant Set := Set'(Tree_Type with Capacity => 0);
 
+   No_Element : constant Cursor := Cursor'(null, 0);
+
 end Ada.Containers.Bounded_Ordered_Sets;
Index: a-ciorma.ads
===================================================================
--- a-ciorma.ads	(revision 183406)
+++ a-ciorma.ads	(working copy)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2011, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
 --                                                                          --
 -- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT. The copyright notice above, and the license provisions that follow --
@@ -32,6 +32,7 @@
 ------------------------------------------------------------------------------
 
 with Ada.Iterator_Interfaces;
+
 private with Ada.Containers.Red_Black_Trees;
 private with Ada.Finalization;
 private with Ada.Streams;
@@ -259,6 +260,18 @@
    use Ada.Finalization;
    use Ada.Streams;
 
+   procedure Write
+     (Stream    : not null access Root_Stream_Type'Class;
+      Container : Map);
+
+   for Map'Write use Write;
+
+   procedure Read
+     (Stream    : not null access Root_Stream_Type'Class;
+      Container : out Map);
+
+   for Map'Read use Read;
+
    type Map_Access is access all Map;
    for Map_Access'Storage_Size use 0;
 
@@ -279,20 +292,6 @@
 
    for Cursor'Read use Read;
 
-   No_Element : constant Cursor := Cursor'(null, null);
-
-   procedure Write
-     (Stream    : not null access Root_Stream_Type'Class;
-      Container : Map);
-
-   for Map'Write use Write;
-
-   procedure Read
-     (Stream    : not null access Root_Stream_Type'Class;
-      Container : out Map);
-
-   for Map'Read use Read;
-
    type Constant_Reference_Type
       (Element : not null access constant Element_Type) is null record;
 
@@ -331,4 +330,6 @@
                                            Busy   => 0,
                                            Lock   => 0));
 
+   No_Element : constant Cursor := Cursor'(null, null);
+
 end Ada.Containers.Indefinite_Ordered_Maps;
Index: a-cobove.ads
===================================================================
--- a-cobove.ads	(revision 183406)
+++ a-cobove.ads	(working copy)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2011, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
 --                                                                          --
 -- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT. The copyright notice above, and the license provisions that follow --
@@ -31,9 +31,10 @@
 -- This unit was originally developed by Matthew J Heaney.                  --
 ------------------------------------------------------------------------------
 
-with Ada.Streams; use Ada.Streams;
 with Ada.Iterator_Interfaces;
 
+private with Ada.Streams;
+
 generic
    type Index_Type is range <>;
    type Element_Type is private;
@@ -64,6 +65,7 @@
    Empty_Vector : constant Vector;
 
    No_Element : constant Cursor;
+
    function Has_Element (Position : Cursor) return Boolean;
 
    package Vector_Iterator_Interfaces is new
@@ -148,34 +150,10 @@
    with
       Implicit_Dereference => Element;
 
-   procedure Read
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : out Constant_Reference_Type);
-
-   for Constant_Reference_Type'Read use Read;
-
-   procedure Write
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : Constant_Reference_Type);
-
-   for Constant_Reference_Type'Write use Write;
-
    type Reference_Type (Element : not null access Element_Type) is private
    with
       Implicit_Dereference => Element;
 
-   procedure Read
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : out Reference_Type);
-
-   for Reference_Type'Read use Read;
-
-   procedure Write
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : Reference_Type);
-
-   for Reference_Type'Write use Write;
-
    function Constant_Reference
      (Container : aliased Vector;
       Position  : Cursor) return Constant_Reference_Type;
@@ -385,6 +363,8 @@
    pragma Inline (Next);
    pragma Inline (Previous);
 
+   use Ada.Streams;
+
    type Elements_Array is array (Count_Type range <>) of aliased Element_Type;
    function "=" (L, R : Elements_Array) return Boolean is abstract;
 
@@ -430,9 +410,33 @@
    type Constant_Reference_Type
       (Element : not null access constant Element_Type) is null record;
 
+   procedure Read
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : out Constant_Reference_Type);
+
+   for Constant_Reference_Type'Read use Read;
+
+   procedure Write
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : Constant_Reference_Type);
+
+   for Constant_Reference_Type'Write use Write;
+
    type Reference_Type
       (Element : not null access Element_Type) is null record;
 
+   procedure Read
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : out Reference_Type);
+
+   for Reference_Type'Read use Read;
+
+   procedure Write
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : Reference_Type);
+
+   for Reference_Type'Write use Write;
+
    Empty_Vector : constant Vector := (Capacity => 0, others => <>);
 
    No_Element : constant Cursor := Cursor'(null, Index_Type'First);
Index: a-convec.ads
===================================================================
--- a-convec.ads	(revision 183406)
+++ a-convec.ads	(working copy)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2011, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
 --                                                                          --
 -- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT. The copyright notice above, and the license provisions that follow --
@@ -31,9 +31,11 @@
 -- This unit was originally developed by Matthew J Heaney.                  --
 ------------------------------------------------------------------------------
 
+with Ada.Iterator_Interfaces;
+
 private with Ada.Finalization;
-with Ada.Streams;
-with Ada.Iterator_Interfaces;
+private with Ada.Streams;
+
 generic
    type Index_Type is range <>;
    type Element_Type is private;
@@ -43,7 +45,6 @@
 package Ada.Containers.Vectors is
    pragma Preelaborate;
    pragma Remote_Types;
-   use Ada.Streams;
 
    subtype Extended_Index is Index_Type'Base
      range Index_Type'First - 1 ..
@@ -61,21 +62,11 @@
 
    type Cursor is private;
    pragma Preelaborable_Initialization (Cursor);
+
    No_Element : constant Cursor;
 
    function Has_Element (Position : Cursor) return Boolean;
 
-   procedure Read
-     (Stream   : not null access Root_Stream_Type'Class;
-      Position : out Cursor);
-
-   for Cursor'Read use Read;
-
-   procedure Write
-     (Stream   : not null access Root_Stream_Type'Class;
-      Position : Cursor);
-   for Cursor'Write use Write;
-
    package Vector_Iterator_Interfaces is new
       Ada.Iterator_Interfaces (Cursor, Has_Element);
 
@@ -160,34 +151,10 @@
    with
       Implicit_Dereference => Element;
 
-   procedure Write
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : Constant_Reference_Type);
-
-   for Constant_Reference_Type'Write use Write;
-
-   procedure Read
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : out Constant_Reference_Type);
-
-   for Constant_Reference_Type'Read use Read;
-
    type Reference_Type (Element : not null access Element_Type) is private
    with
       Implicit_Dereference => Element;
 
-   procedure Write
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : Reference_Type);
-
-   for Reference_Type'Write use Write;
-
-   procedure Read
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : out Reference_Type);
-
-   for Reference_Type'Read use Read;
-
    function Constant_Reference
      (Container : aliased Vector;
       Position  : Cursor) return Constant_Reference_Type;
@@ -404,6 +371,7 @@
    type Elements_Access is access Elements_Type;
 
    use Ada.Finalization;
+   use Ada.Streams;
 
    type Vector is new Controlled with record
       Elements : Elements_Access;
@@ -412,13 +380,9 @@
       Lock     : Natural := 0;
    end record;
 
-   type Vector_Access is access all Vector;
-   for Vector_Access'Storage_Size use 0;
+   overriding procedure Adjust (Container : in out Vector);
 
-   type Cursor is record
-      Container : Vector_Access;
-      Index     : Index_Type := Index_Type'First;
-   end record;
+   overriding procedure Finalize (Container : in out Vector);
 
    procedure Write
      (Stream    : not null access Root_Stream_Type'Class;
@@ -432,17 +396,58 @@
 
    for Vector'Read use Read;
 
+   type Vector_Access is access all Vector;
+   for Vector_Access'Storage_Size use 0;
+
+   type Cursor is record
+      Container : Vector_Access;
+      Index     : Index_Type := Index_Type'First;
+   end record;
+
+   procedure Read
+     (Stream   : not null access Root_Stream_Type'Class;
+      Position : out Cursor);
+
+   for Cursor'Read use Read;
+
+   procedure Write
+     (Stream   : not null access Root_Stream_Type'Class;
+      Position : Cursor);
+
+   for Cursor'Write use Write;
+
    type Constant_Reference_Type
       (Element : not null access constant Element_Type) is null record;
 
+   procedure Write
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : Constant_Reference_Type);
+
+   for Constant_Reference_Type'Write use Write;
+
+   procedure Read
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : out Constant_Reference_Type);
+
+   for Constant_Reference_Type'Read use Read;
+
    type Reference_Type
       (Element : not null access Element_Type) is null record;
 
-   overriding procedure Adjust (Container : in out Vector);
+   procedure Write
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : Reference_Type);
 
-   overriding procedure Finalize (Container : in out Vector);
+   for Reference_Type'Write use Write;
 
+   procedure Read
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : out Reference_Type);
+
+   for Reference_Type'Read use Read;
+
    No_Element   : constant Cursor := Cursor'(null, Index_Type'First);
+
    Empty_Vector : constant Vector := (Controlled with null, No_Index, 0, 0);
 
 end Ada.Containers.Vectors;
Index: a-cohase.ads
===================================================================
--- a-cohase.ads	(revision 183406)
+++ a-cohase.ads	(working copy)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2011, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
 --                                                                          --
 -- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT. The copyright notice above, and the license provisions that follow --
@@ -32,6 +32,7 @@
 ------------------------------------------------------------------------------
 
 with Ada.Iterator_Interfaces;
+
 private with Ada.Containers.Hash_Tables;
 private with Ada.Streams;
 private with Ada.Finalization;
@@ -476,6 +477,18 @@
    use Ada.Finalization;
    use Ada.Streams;
 
+   procedure Write
+     (Stream    : not null access Root_Stream_Type'Class;
+      Container : Set);
+
+   for Set'Write use Write;
+
+   procedure Read
+     (Stream    : not null access Root_Stream_Type'Class;
+      Container : out Set);
+
+   for Set'Read use Read;
+
    type Set_Access is access all Set;
    for Set_Access'Storage_Size use 0;
 
@@ -496,20 +509,6 @@
 
    for Cursor'Read use Read;
 
-   No_Element : constant Cursor := (Container => null, Node => null);
-
-   procedure Write
-     (Stream    : not null access Root_Stream_Type'Class;
-      Container : Set);
-
-   for Set'Write use Write;
-
-   procedure Read
-     (Stream    : not null access Root_Stream_Type'Class;
-      Container : out Set);
-
-   for Set'Read use Read;
-
    type Constant_Reference_Type
      (Element : not null access constant Element_Type) is null record;
 
@@ -527,4 +526,6 @@
 
    Empty_Set : constant Set := (Controlled with HT => (null, 0, 0, 0));
 
+   No_Element : constant Cursor := (Container => null, Node => null);
+
 end Ada.Containers.Hashed_Sets;
Index: a-cbdlli.ads
===================================================================
--- a-cbdlli.ads	(revision 183406)
+++ a-cbdlli.ads	(working copy)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2011, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
 --                                                                          --
 -- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT. The copyright notice above, and the license provisions that follow --
@@ -31,9 +31,10 @@
 -- This unit was originally developed by Matthew J Heaney.                  --
 ------------------------------------------------------------------------------
 
-with Ada.Streams; use Ada.Streams;
 with Ada.Iterator_Interfaces;
 
+private with Ada.Streams;
+
 generic
    type Element_Type is private;
 
@@ -93,35 +94,11 @@
    with
       Implicit_Dereference => Element;
 
-   procedure Write
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : Constant_Reference_Type);
-
-   for Constant_Reference_Type'Write use Write;
-
-   procedure Read
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : out Constant_Reference_Type);
-
-   for Constant_Reference_Type'Read use Read;
-
    type Reference_Type
      (Element : not null access Element_Type) is private
    with
       Implicit_Dereference => Element;
 
-   procedure Write
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : Reference_Type);
-
-   for Reference_Type'Write use Write;
-
-   procedure Read
-     (Stream : not null access Root_Stream_Type'Class;
-      Item   : out Reference_Type);
-
-   for Reference_Type'Read use Read;
-
    function Constant_Reference
      (Container : aliased List;
       Position  : Cursor) return Constant_Reference_Type;
@@ -270,6 +247,8 @@
    pragma Inline (Next);
    pragma Inline (Previous);
 
+   use Ada.Streams;
+
    type Node_Type is record
       Prev    : Count_Type'Base;
       Next    : Count_Type;
@@ -324,9 +303,33 @@
    type Constant_Reference_Type
       (Element : not null access constant Element_Type) is null record;
 
+   procedure Write
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : Constant_Reference_Type);
+
+   for Constant_Reference_Type'Write use Write;
+
+   procedure Read
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : out Constant_Reference_Type);
+
+   for Constant_Reference_Type'Read use Read;
+
    type Reference_Type
       (Element : not null access Element_Type) is null record;
 
+   procedure Write
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : Reference_Type);
+
+   for Reference_Type'Write use Write;
+
+   procedure Read
+     (Stream : not null access Root_Stream_Type'Class;
+      Item   : out Reference_Type);
+
+   for Reference_Type'Read use Read;
+
    Empty_List : constant List := (Capacity => 0, others => <>);
 
    No_Element : constant Cursor := Cursor'(null, 0);
Index: a-cbhase.ads
===================================================================
--- a-cbhase.ads	(revision 183406)
+++ a-cbhase.ads	(working copy)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2004-2011, Free Software Foundation, Inc.         --
+--          Copyright (C) 2004-2012, Free Software Foundation, Inc.         --
 --                                                                          --
 -- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT. The copyright notice above, and the license provisions that follow --
@@ -32,6 +32,7 @@
 ------------------------------------------------------------------------------
 
 with Ada.Iterator_Interfaces;
+
 private with Ada.Containers.Hash_Tables;
 private with Ada.Streams;
 
@@ -478,6 +479,18 @@
    use HT_Types;
    use Ada.Streams;
 
+   procedure Write
+     (Stream    : not null access Root_Stream_Type'Class;
+      Container : Set);
+
+   for Set'Write use Write;
+
+   procedure Read
+     (Stream    : not null access Root_Stream_Type'Class;
+      Container : out Set);
+
+   for Set'Read use Read;
+
    type Set_Access is access all Set;
    for Set_Access'Storage_Size use 0;
 
@@ -504,20 +517,6 @@
 
    for Cursor'Read use Read;
 
-   No_Element : constant Cursor := (Container => null, Node => 0);
-
-   procedure Write
-     (Stream    : not null access Root_Stream_Type'Class;
-      Container : Set);
-
-   for Set'Write use Write;
-
-   procedure Read
-     (Stream    : not null access Root_Stream_Type'Class;
-      Container : out Set);
-
-   for Set'Read use Read;
-
    type Constant_Reference_Type
      (Element : not null access constant Element_Type) is null record;
 
@@ -536,4 +535,6 @@
    Empty_Set : constant Set :=
                  (Hash_Table_Type with Capacity => 0, Modulus => 0);
 
+   No_Element : constant Cursor := (Container => null, Node => 0);
+
 end Ada.Containers.Bounded_Hashed_Sets;
