def answer.queries

ezx@1.11.0.0 · src/lock/run.bend:562

import ezx@1.11.0.0/src/lock/run.bend as Run
import Base
import ezx@1.11.0.0/src/lock/up.bend as Up
import ezx@1.11.0.0/src/lock/plan.bend as Plan

562# every query of the lock's upgrade: git is asked the question as the planner
563# anchored it, and the answer is recorded under the question the upgrade
564# looks it up by
565def answer.queries(+lib: String, qs: List<&2, Plan.Query>) -> IO(List<&2, Up.Reply>):
566  match qs:
567    case []:
568      IO.pure(List<&2, Up.Reply>, [])
569    case Plan.Query{ask, git} <> t:
570      do IO<List<&2, Up.Reply>>:
571        a : Up.Answer <- answer.up(lib, git)
572        rest : List<&2, Up.Reply> <- answer.queries(lib, t)
573        return Up.Reply{ask, a} <> rest

Uses (9)

Used by (1)