Run.planned: def of cli@0.2.0.0 Import: import cli@0.2.0.0/run.bend as Run Lines 131-139 of cli@0.2.0.0/run.bend: https://jend.leeeet.dev/read.txt?path=cli@0.2.0.0/run.bend&start_line=131&end_line=139 import Base import cli@0.2.0.0/cli.bend as Cli # ยง7.2: the whole main of an app whose action is a pure plan: Cli.invoke's # run on the host and argv, written out, so a law on Cli.invoke states what # the app prints and exits with. def planned(~A: Type, ~decode: @+m: Cli.Matches -> Cli.Dec(A), ~plan: @+t: Cli.Term -> A -> Cli.Ran, +c: Cli.Cmd) -> IO(Unit): do IO: args : List> <- IO.args_bytes() h : Cli.Host <- host(c) wrote(Cli.invoke(~A, ~decode, ~plan, c, h, argv_of(args))) Uses (16): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.args_bytes https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=Cmd https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=Dec https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=Host https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=Matches https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=Ran https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=Term https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=invoke https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/run.bend&name=argv_of https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/run.bend&name=host https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/run.bend&name=wrote