bundle_recovery.bend
bendvy-ecs-core@0.1.0.1 · 9 lines · 0 definitions
1import Base
2import bundle_pack.bend as B
3import bundle_install.bend as F
4
5# An explicitly requested restoration step; unchanged existing inverse order.
6def resume(~World:Type,~H:Type,~HQ:Type,~Tail:Type,~TQ:Type,~head:World -> HQ -> F.Restore<World,H,HQ>,~tail:World -> TQ -> F.Restore<World,Tail,TQ>,world:World,recovery:F.Recovery<World,H,HQ,Tail,TQ>) -> F.Restore<World,B.Pack<H,Tail>,F.Recovery<World,H,HQ,Tail,TQ>>:
7 match recovery:
8 case F.HeadPending{pending,rest}:F.restored_head(~World,~H,~HQ,~Tail,~TQ,head(world,pending),rest)
9 case F.TailPending{undoHead,pending}:F.restored_tail(~World,~H,~HQ,~Tail,~TQ,undoHead,tail(world,pending))