def cas.store

cswap-bend-cli@0.1.0.0 · usage/gate.bend:95

import cswap-bend-cli@0.1.0.0/usage/gate.bend as Gate
import Base
import cswap-bend-cli@0.1.0.0/fs.bend as Fs
import cswap-bend-cli@0.1.0.0/json.bend as Json

95def cas.store(+m: Maybe<&2, String>, +path: String, +text: String, +cur: String, +new: String, +acct: Json.Json) -> IO(Fs.Res(Gated)):
96  match m:
97    case None{}:
98      done.g(gated.ok_a(new, Some{cur}, acct))
99    case Some{+now_cred}:
100      cas.pick(String.eq(fp(now_cred), fp(cur)), path, text, new, acct, now_cred)

Uses (11)

Used by (1)