diff options
| author | Jedidiah Barber <contact@jedbarber.id.au> | 2026-02-06 21:32:44 +1300 |
|---|---|---|
| committer | Jedidiah Barber <contact@jedbarber.id.au> | 2026-02-06 21:32:44 +1300 |
| commit | 0b9e8a567265584f8ad5f321a38cf1f183875693 (patch) | |
| tree | 970c4e4e66b6a8e5e668dc1c12f1d68a8a7a67be /src/kompsos.adb | |
| parent | 6bced91bd28f860d830dfda921ee5056ec93f48c (diff) | |
Changed the map for DOT in Pretty_Print to a Hashed_Map
Diffstat (limited to 'src/kompsos.adb')
| -rw-r--r-- | src/kompsos.adb | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/kompsos.adb b/src/kompsos.adb index b12e1fb..7eecb00 100644 --- a/src/kompsos.adb +++ b/src/kompsos.adb @@ -8,8 +8,11 @@ with + Ada.Containers, Ada.Unchecked_Deallocation, - Kompsos.Collector; + Kompsos.Collector, + System.Address_To_Access_Conversions, + System.Storage_Elements; package body Kompsos is @@ -268,6 +271,21 @@ package body Kompsos is + -- Goals -- + + package Graph_Comp_Conv is new System.Address_To_Access_Conversions (Graph_Component); + + function Graph_Component_Access_Hash + (Key : in Graph_Component_Access) + return Ada.Containers.Hash_Type + is + use Ada.Containers, Graph_Comp_Conv, System.Storage_Elements; + begin + return Hash_Type (To_Integer (To_Address (Object_Pointer (Key))) mod Hash_Type'Modulus); + end Graph_Component_Access_Hash; + + + ------------------- -- microKanren -- |
