Profswitch.decided: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/profswitch.bend as Profswitch Lines 69-76 of cswap-bend-cli@0.1.0.0/profswitch.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/profswitch.bend&start_line=69&end_line=76 import Base import cswap-bend-cli@0.1.0.0/json.bend as Json import cswap-bend-cli@0.1.0.0/act.bend as Act import cswap-bend-cli@0.1.0.0/store/base.bend as SBase import cswap-bend-cli@0.1.0.0/swlive.bend as L import cswap-bend-cli@0.1.0.0/switch.bend as Sw import cswap-bend-cli@0.1.0.0/profile.bend as P import cswap-bend-cli@0.1.0.0/policy/types.bend as T def decided(+p: P.Prof, +ctx: SBase.Ctx, +opts: L.Opts, +cur: Json.Json, +d: T.Decision) -> Act.of(Json.Json): match d: case T.Switch{to, trig, why, h, mode, rec, bar}: do ActM: r : Json.Json <- Sw.switch_to(ctx, Nat.show(to), False{}, opts) return tag(p, r) case T.NoSwitch{reason, detail}: Act.pure(Json.Json, noop(p, T.reason.name(reason), nothing_msg(reason, detail), cur)) Uses (17): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.show https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/act.bend&name=of https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/act.bend&name=pure https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/json.bend&name=Json https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/policy/types.bend&name=Decision https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/policy/types.bend&name=reason.name https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/profile.bend&name=Prof https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/profswitch.bend&name=ActM https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/profswitch.bend&name=ActM.bind https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/profswitch.bend&name=ActM.pure https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/profswitch.bend&name=noop https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/profswitch.bend&name=nothing_msg https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/profswitch.bend&name=tag https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/store/base.bend&name=Ctx https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/switch.bend&name=switch_to https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/swlive.bend&name=Opts