def route

cswap-bend-cli@0.1.0.0 · profswitch.bend:173

import cswap-bend-cli@0.1.0.0/profswitch.bend as Profswitch
import Base
import cswap-bend-cli@0.1.0.0/json.bend as Json
import cswap-bend-cli@0.1.0.0/cmd.bend as Cmd
import cswap-bend-cli@0.1.0.0/setload.bend as Setload
import cswap-bend-cli@0.1.0.0/store/base.bend as SBase

173def route(+tgt: Bool, +over: Maybe<&2, String>, +ctx: SBase.Ctx, +ident: Maybe<&2, String>, +force: Bool, +strategy: Maybe<&2, String>, +model: Maybe<&2, String>, +json: Bool) -> IO(Cmd.Out):
174  match tgt:
175    case True{}:
176      targeted_out(over, ctx, ident, force, strategy, model, json)
177    case False{}:
178      IO.bind(Json.Json, Cmd.Out, Setload.load(SBase.root_of(ctx)), raw => loaded(over, ctx, ident, force, strategy, model, json, raw))

Uses (12)

Used by (1)