From 0b9e8a567265584f8ad5f321a38cf1f183875693 Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Fri, 6 Feb 2026 21:32:44 +1300 Subject: Changed the map for DOT in Pretty_Print to a Hashed_Map --- src/kompsos.adb | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'src/kompsos.adb') 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 -- -- cgit