def next.up
import ezx@1.11.0.0/src/lock/world.bend as Worldimport Base
import ezx@1.11.0.0/src/lock/up.bend as Up
449# a plain lock's is ez.toml as it is. An upgrade's is what the upgrade
450# decides on its answers: the ledger it writes, or its refusal, or the
451# questions it still has.
452def next.up(up: Bool, +only: String, +ledger: Maybe<&2, String>, ups: List<&2, Up.Reply>) -> Up.Next:
453 match up:
454 case False{}:
455 Up.plain(parsed(ledger))
456 case True{}:
457 Up.next(only, parsed(ledger), ups)