aboutsummaryrefslogtreecommitdiffstats
path: root/src/lists.ads
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-11-09 20:46:38 +0100
committerTristan Gingold <tgingold@free.fr>2021-11-09 20:46:38 +0100
commit144cedec159574df474579fa2cc7fde7e61eadbc (patch)
treecf6baa5b3a959d0c91ca837b9383930d9e2486b6 /src/lists.ads
parentfbd853c88b4b1c3008b1b39882ac2b99b6e59460 (diff)
downloadghdl-144cedec159574df474579fa2cc7fde7e61eadbc.tar.gz
ghdl-144cedec159574df474579fa2cc7fde7e61eadbc.tar.bz2
ghdl-144cedec159574df474579fa2cc7fde7e61eadbc.zip
lists: add a subtype for valid lists
Diffstat (limited to 'src/lists.ads')
-rw-r--r--src/lists.ads4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lists.ads b/src/lists.ads
index a4359b51b..d06170223 100644
--- a/src/lists.ads
+++ b/src/lists.ads
@@ -24,6 +24,8 @@ package Lists is
Null_List : constant List_Type := 0;
List_All : constant List_Type := 1;
+ subtype List_Valid_Type is List_Type range List_All + 1 .. List_Type'Last;
+
-----------
-- Lists --
-----------
@@ -99,7 +101,7 @@ package Lists is
-- end loop;
type Iterator is private;
- function Iterate (List : List_Type) return Iterator;
+ function Iterate (List : List_Valid_Type) return Iterator;
function Is_Valid (It : Iterator) return Boolean;
procedure Next (It : in out Iterator);
function Get_Element (It : Iterator) return El_Type;