--  Sema forms of tranche R3 (D195): a character literal and an operator by expanded name;
--  T'Base; attributes Verada writes as others ('Img, 'Enum_Rep, 'Enum_Val, 'Wide_Width,
--  'Mod, 'First_Valid, 'Constrained, 'Valid_Scalars); Boolean-array operators; a literal
--  in a Wide_Wide_String concatenation; 'Round of a decimal product; an untagged limited
--  derivation; a generic formal procedure `is null`; Type_Invariant on a partial view.
with Ada.Text_IO;
with Ada.Wide_Wide_Text_IO;
with Shapes;
procedure Main is
   type Byte is mod 2**8;
   type Colour is (Red, Green, Blue);
   type Small is range 1 .. 10;
   type Bits is array (0 .. 3) of Boolean;
   type Money is delta 0.01 digits 12;
   type Rate is delta 0.0001 digits 6;
   type Counter is limited record
      Value : Integer := 0;
   end record;
   type Meter is limited new Counter;
   type Pair is record
      A : Integer := 1;
      B : Boolean := True;
   end record;
   generic
      with procedure Hook (X : Integer) is null;
   procedure Call_Hook (X : Integer);
   procedure Call_Hook (X : Integer) is
   begin
      Hook (X);
   end Call_Hook;
   procedure Hook_None is new Call_Hook;
   L : constant Shapes.Letter := Shapes.'b';
   V : constant Shapes.Vec := Shapes."+" ((1, 2), (3, 4));
   Z : constant Small'Base := Small'Base'First;
   A : Bits := (0 | 2 => True, others => False);
   W : constant Wide_Wide_String := "αβ";
   Tax : constant Money := Money'Round (Money'(19.99) * Rate'(0.0825));
   M : Meter;
   P : constant Pair := (A => 3, B => False);
   B : constant Shapes.Bounded := Shapes.Make (4);
   I : constant Integer := 7;
begin
   Hook_None (1);
   A := (not A) and (A or (Bits'(others => True) xor A));
   M.Value := 2;
   Ada.Text_IO.Put_Line (Shapes.Letter'Image (L) & Integer'Image (V.X) & Integer'Image (V.Y) & Boolean'Image (Z < 0));
   Ada.Text_IO.Put_Line (I'Img & Integer'Image (Colour'Enum_Rep (Blue)) & " " & Colour'Image (Colour'Enum_Val (1)) & Integer'Image (Colour'Wide_Width));
   Ada.Text_IO.Put_Line (Byte'Image (Byte'Mod (-7)) & Integer'Image (Natural'First_Valid) & Boolean'Image (P'Constrained) & Boolean'Image (P'Valid_Scalars));
   Ada.Text_IO.Put_Line (Boolean'Image (A (0)) & Boolean'Image (A (1)) & Money'Image (Tax) & Integer'Image (M.Value) & Integer'Image (Shapes.Value (B)));
   Ada.Wide_Wide_Text_IO.Put_Line (W & " and " & W & '!');
end Main;
