← All docs
readline() — internals
Compiler internals for readline(): lowering path, type checks, and runtime helpers.
readline() — internals
Where it lives
- Signature:
src/builtins/io/readline.rs - Lowering:
src/codegen/lower_inst/builtins/io.rs:309 (lower_readline) - Function symbol:
lower_readline()
Lowering notes
- Lowers
readline(prompt?)by optionally writing a prompt and reading stdin.
Runtime helpers
The following runtime helpers are referenced:
__rt_fgets__rt_vd_write
Signature summary
function readline(string $prompt = null): mixed
What the type checker enforces
- Arity: takes 0–1 arguments (1 optional).
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/filesystem/readline.rs(eval_builtin!) - Dispatch hooks:
direct,values