so i recent had a borrow checking problem, and the (very kind) @steffahn recommended that I use the stacker crate instead of trying too manually manage a stack (to which I agree).
but then, after it was solved, I noticed that after calling stacker::maybe_grow
, it exited and seemed to suggest that a stack overflow had occurred.
repo is here.
to reproduce:
git clone https://github.com/pro465/rhokell
cd rhokell
echo "exp(s s z(), s s s s s s s s s s s s z())" | cargo r ./examples/peano.rhk
output on my machine (windows 11):
Finished dev [unoptimized + debuginfo] target(s) in 0.02s
Running `target\debug\rhokell.exe .\examples\peano.rhk`
welcome to rhokell v0.1.0!
input `q`, `quit`, or `exit` for exiting the REPL
=> <4096*"s " + "z()">
thread 'main' has overflowed its stack
error: process didn't exit successfully: `target\debug\rhokell.exe .\examples\peano.rhk` (exit code: 0xc00000fd, STATUS_STACK_OVERFLOW)
the only problem is, i do not have any deeply recursive calls after that. in fact, the only thing that happens is it prompts the user for another expression.