def sources.swap
import ezx@1.11.0.0/src/lock/world.bend as Worldimport Base
import ezx@1.11.0.0/src/ledger/upgrade.bend as U
498# every committed source with each hash the upgrade moved rewritten in its
499# imports, as the upgrade writes it
500def sources.swap(+ss: List<&2, U.Swap>, fs: List<&2, Source>) -> List<&2, Source>:
501 match fs:
502 case []:
503 []
504 case Source{at, text} <> t:
505 Source{at, U.reimport.many(ss, text)} <> sources.swap(ss, t)