Root causeMetta::new_loading_runner creates an empty space but doesn't import stdlib into it while it gets all standard tokens. Thus all MeTTa definitions of the stdlib are not available for the interpreted code. It affects minimal MeTTa even more serious because interpreter itself is also part of the MeTTa stdlib code.
Code which uses MeTTa definitions of stdlib inside a module imported using
import!
doesn't work:Steps to reproduce
imported.metta
:import.metta
:Run
import.metta
Expected result
Actual result
Root cause
Metta::new_loading_runner
creates an empty space but doesn't import stdlib into it while it gets all standard tokens. Thus all MeTTa definitions of the stdlib are not available for the interpreted code. It affects minimal MeTTa even more serious because interpreter itself is also part of the MeTTa stdlib code.https://github.com/trueagi-io/hyperon-experimental/blob/0c17c629dce868a3d954c2ff725e7586ac4c8a8b/lib/src/metta/runner/mod.rs#L151-L164
This should be fixed during work on https://github.com/trueagi-io/hyperon-experimental/issues/470