1 import Base 2 import bundle_pack.bend as B 3 import bundle_install.bend as F 4 5 # An explicitly requested restoration step; unchanged existing inverse order. 6 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>: 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))