diff options
| author | Jedidiah Barber <contact@jedbarber.id.au> | 2025-11-17 15:35:49 +1300 |
|---|---|---|
| committer | Jedidiah Barber <contact@jedbarber.id.au> | 2025-11-17 15:35:49 +1300 |
| commit | fc4bc559d3f1ebf056c4afb8280a1ec8f4d90bc2 (patch) | |
| tree | 4e7e3f308f26fbc9162a3766b55da67423a1a81c /src | |
| parent | 0e3cb04b840c3ecc61b9e3efc77af5ebea585d17 (diff) | |
Lazy Conjunct should properly work for infinite results now
Diffstat (limited to 'src')
| -rw-r--r-- | src/kompsos.adb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/kompsos.adb b/src/kompsos.adb index 2093406..d0005cb 100644 --- a/src/kompsos.adb +++ b/src/kompsos.adb @@ -355,10 +355,12 @@ package body Kompsos is Ptr (This.Engine.Con_World).Rollover; if Ptr (This.Engine.Con_World).Possibles.Length > 0 then declare - Next : constant World := - Call_Lazy (Ptr (This.Engine.Con_World).all, This.Engine.Con_Data); + So_Far : constant World := + ((Possibles => Ptr (This.Engine.Con_World).Possibles, + Engine => (Kind => No_Gen))); begin - This := Next; + Ptr (This.Engine.Con_World).Possibles.Clear; + This := Disjunct (Call_Lazy (So_Far, This.Engine.Con_Data), This); end; elsif Ptr (This.Engine.Con_World).Engine.Kind = No_Gen then This.Engine := (Kind => No_Gen); |
