Setimp.prof_upd: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/setimp.bend as Setimp Lines 221-228 of cswap-bend-cli@0.1.0.0/setimp.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/setimp.bend&start_line=221&end_line=228 import Base import cswap-bend-cli@0.1.0.0/json.bend as Json import cswap-bend-cli@0.1.0.0/setload.bend as Setload import cswap-bend-cli@0.1.0.0/profile.bend as P # One profile key, checked as `profile set` checks it; the stored value comes # back as the profile file would hold it ("inherit" and null are null). def prof_upd(+k: String, u: P.Upd) -> Result<&2, &2, String, Json.Json>: match u: case P.UBad{m}: Fail{m} case P.UOk{p}: Done{or_null(Json.get(k, P.to_json(p, Setload.empty())))} Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String 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/json.bend&name=get https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/profile.bend&name=Upd https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/profile.bend&name=to_json https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/setimp.bend&name=or_null https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/setload.bend&name=empty