From 28d132c2823d7dfa21190bf746f9f39dd59a40d8 Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Thu, 22 Jan 2026 16:41:39 +1300 Subject: States are now custom linked lists --- src/kompsos-collector.adb | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/kompsos-collector.adb') diff --git a/src/kompsos-collector.adb b/src/kompsos-collector.adb index c8333cf..4654dc7 100644 --- a/src/kompsos-collector.adb +++ b/src/kompsos-collector.adb @@ -95,13 +95,21 @@ package body Kompsos.Collector is -- Unify Variable and other Terms by introducing a new substitution if Real_Left.Kind = Var_Term then - Extended := Potential; - Extended.Actual.Append ((Real_Left.Var, Real_Right)); + Extended := (Ctrl => (Ada.Finalization.Controlled with + Actual => new State_Component'( + Counter => 1, + Key => Real_Left.Var, + Value => Real_Right, + Next => Potential))); return True; end if; if Real_Right.Kind = Var_Term then - Extended := Potential; - Extended.Actual.Append ((Real_Right.Var, Real_Left)); + Extended := (Ctrl => (Ada.Finalization.Controlled with + Actual => new State_Component'( + Counter => 1, + Key => Real_Right.Var, + Value => Real_Left, + Next => Potential))); return True; end if; -- cgit