beamtea_cmd (beamtea v0.1.2)
View SourcePure interpretation of beamtea:cmd() values into a flat list of side-effects.
Keeping this translation pure (no message sends, no timers, no spawns) means the whole command language can be unit-tested without a terminal or a running runtime. beamtea_runtime executes the resulting effects.
Summary
Functions
Flatten a command into zero or more effects. Unknown commands raise {bad_command, Cmd} so mistakes surface loudly during development.
Types
-type effect() :: quit | {msg, term()} | {after_ms, non_neg_integer(), term()} | {every, pos_integer(), term()} | {task, fun(() -> term())}.
Functions
-spec to_effects(beamtea:cmd()) -> [effect()].
Flatten a command into zero or more effects. Unknown commands raise {bad_command, Cmd} so mistakes surface loudly during development.