← All docs
fgets() — internals
Compiler internals for fgets(): lowering path, type checks, and runtime helpers.
fgets() — internals
Where it lives
- Signature:
src/builtins/io/fgets.rs - Lowering:
src/codegen/lower_inst/builtins/io.rs:2965 (lower_fgets) - Function symbol:
lower_fgets()
Lowering notes
- Lowers
fgets(stream)through the shared line-read runtime helper.
Runtime helpers
The following runtime helpers are referenced:
__rt_fgetc__rt_fgets
Signature summary
function fgets(resource $stream): mixed
What the type checker enforces
- Arity: takes exactly 1 argument.
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/filesystem/fgets.rs(eval_builtin!) - Dispatch hooks:
direct,values