import Base import bundle_pack.bend as B import bundle_install.bend as F # An explicitly requested restoration step; unchanged existing inverse order. def resume(~World:Type,~H:Type,~HQ:Type,~Tail:Type,~TQ:Type,~head:World -> HQ -> F.Restore,~tail:World -> TQ -> F.Restore,world:World,recovery:F.Recovery) -> F.Restore,F.Recovery>: match recovery: case F.HeadPending{pending,rest}:F.restored_head(~World,~H,~HQ,~Tail,~TQ,head(world,pending),rest) case F.TailPending{undoHead,pending}:F.restored_tail(~World,~H,~HQ,~Tail,~TQ,undoHead,tail(world,pending))