~/bend-docscommunity

src/share/spin.bend relies on unsafe/foreign

raw source on the hub · import 0x886223f5c47e4983fe57d887c034bc7f/src/share/spin.bend as Spin

share/spin: the spinner share/say's words are drawn with. This is the half that runs programs: it asks which terminal this process writes to, starts the mark as a child and stops it. It lives apart from the words because a program runs through snap's foreign effect, and bend 2.0.32 fails a proof whose imports reach foreign code, so a law may import share/say but never this.

3 imports
import Base
import 0xabe575924687afad4cee1a2c1194d639/main.bend as R
import ./say.bend as Say

Definitions

def dev source · line 18 · raw

IO(String)

the terminal this process writes to, stderr's first, or empty for none

def start source · line 25 · raw

@on:Bool -> @+dev:String -> @+msg:String -> IO(0x886223f5c47e4983fe57d887c034bc7f/src/share/say.Spin)

the mark, when there is a terminal to draw it on

def hold.at source · line 34 · raw

@plain:Bool -> @+dev:String -> @+msg:String -> IO(0x886223f5c47e4983fe57d887c034bc7f/src/share/say.Spin)

def hold source · line 45 · raw

@+msg:String -> IO(0x886223f5c47e4983fe57d887c034bc7f/src/share/say.Spin)

the line, then the mark when a terminal will show it moving. A pipe gets the line and nothing else.

def owed source · line 52 · raw

@empty:Bool -> @+msg:String -> IO(Unit)

a spinner that never started still owes its line, unless the plain path already printed it and left the message empty

def done.live source · line 60 · raw

@+dev:String -> @+pid:String -> @+msg:String -> IO(Unit)

the mark stopped, and the line written where it was

def done.bad source · line 66 · raw

@bad:Bool -> @+dev:String -> @+pid:String -> @+msg:String -> IO(Unit)

def done source · line 74 · raw

@spin:0x886223f5c47e4983fe57d887c034bc7f/src/share/say.Spin -> IO(Unit)

the step finished: the mark stopped and the line left, or the line owed