-- Universal_Integer is actually implicit, but here is its explicit definition type Universal_Integer is range -Infinity to Infinity; -- 1) Standard integers types type Integer is new Universal_Integer range to ; subtype Natural is Integer range 0 to Integer'High; subtype Positive is Natural range 1 to Natural'High; -- The following will be put in a separate package in order to keep backward -- compatibility with code using numeric_std. -- 2) Binary integers types -- The difference with standard integers is that they will be represented -- in bits which implies that they have an extra size property available to define -- their size in bits. Except for modulo integers, overflowing the range is also -- forbidden just as standard integers. type Binary_Integer is new Universal_Integer with Binary => True; -- 2.1) Signed / unsigned integers types type Signed is new Binary_Integer; type Unsigned is new Binary_Integer range 0 to Binary_Integer'High; -- 2.2) Modulo integers types -- Overflows don't raise an error but a modulo operation will be made instead type Modulo_Integer is new Binary_Integer with Modulo => True; -- 2.2.1) Signed / unsigned integers modulo types -- We could possibly replace «(Un)signed'Low to (Un)signed'High» by -- (Un)signed'Range if we first make that legal just as it is in Ada. type Mod_Unsigned is new Modulo_Integer range Unsigned'Low to Unsigned'High; type Mod_Signed is new Modulo_Integer range Signed'Low to Signed'High;