def planned
import cswap-bend-cli@0.1.0.0/profcmd.bend as Profcmdimport Base
import cswap-bend-cli@0.1.0.0/cmd.bend as Cmd
import cswap-bend-cli@0.1.0.0/fs.bend as Fs
import cswap-bend-cli@0.1.0.0/setcmd.bend as Setcmd
233# Read settings.json strictly (a torn file is an error, never replaced), plan, write.
234def planned(+root: String, r: Fs.Res(Plan2)) -> IO(Cmd.Out):
235 match r:
236 case Fail{e}:
237 IO.pure(Cmd.Out, Cmd.fail(Setcmd.err.msg(e)))
238 case Done{w}:
239 edit(root, w)