~/bend-docscommunity

src/stop.bend checks

raw source on the hub · import 0x582b4b0fdf3dafdeecc8c3bfddc5e4db/src/stop.bend as Stop

src/stop: a Stop done (Args.out's decision to print and exit): a text on its stream, then the exit code. Pure but for the IO it returns, and apart from main.bend, so its laws (the root LAWS.bend) reach no foreign code.

2 imports
import Base
import ./args.bend as Args

Definitions

def say source · line 8 · raw

@to:0x582b4b0fdf3dafdeecc8c3bfddc5e4db/src/args.Stream -> @text:String -> IO(Unit)

a text on its stream

def leave.at source · line 17 · raw

@zero:Bool -> @code:U32 -> IO(Unit)

def leave source · line 25 · raw

@+code:U32 -> IO(Unit)

exit with a code: 0 falls through, any other ends the run with it