def rank.bar

cswap-bend-cli@0.1.0.0 · policy/decide.bend:310

import cswap-bend-cli@0.1.0.0/policy/decide.bend as Decide
import Base
import cswap-bend-cli@0.1.0.0/policy/types.bend as T
import cswap-bend-cli@0.1.0.0/policy/usage.bend as U
import cswap-bend-cli@0.1.0.0/policy/rank.bend as R
import cswap-bend-cli@0.1.0.0/policy/pick.bend as K
import cswap-bend-cli@0.1.0.0/policy/bar.bend as B

310def rank.bar(+bar: Maybe<&2, Nat>, +recov: Bool, +t: T.Trigger, +e: Env) -> T.Decision:
311  match e:
312    case Env{active, as, us, now, cfg, st, mem}:
313      sw.pick(K.rk.bar(rk.base(t, env.ah(e), active, as, us, now, cfg), bar), as, t, choose.retry(Bool.not(B.is_none(bar)) && recov, t, as, rk.base(t, env.ah(e), active, as, us, now, cfg), decide.none(t, R.seven.row(U.usage.of(active, us), now, cfg.models(cfg)), as, active, us, now, cfg)))

Uses (18)

Used by (1)