Hoot runtime module compilation error

While implementing REPL into my engine for developing and running visual novels, I discovered that my code compiled through guild compile-wasm with the -gruntime-modules option produces the following error when I run the code in the browser:

Hoot backtrace: In unknown file: reflect.js:903:49

7 (“_” …) reflect.js:903:49

6 (“_” …) reflect.js:903:49

In modules/ren-sexp/utils.scm: reflect.js:903:49

1:1 5 (“_” …) reflect.js:903:49

In hoot/hackable.scm: reflect.js:903:49

44:6 4 (“declare-module!” …) reflect.js:903:49

In hoot/lists.scm: reflect.js:903:49

135:10 3 (“for-each” …) reflect.js:903:49

145:14 2 (“for-each” …) reflect.js:903:49

In hoot/modules.scm: reflect.js:903:49

208:4 1 (“module-import!” …) reflect.js:903:49

In hoot/errors.scm: reflect.js:903:49

95:22 0 (“_” …) reflect.js:903:49

Uncaught exception: 1. #<&undefined-variable module: #< name: (ice-9 atomic) exports: #<hashtable size: 6> defs: #<hashtable size: 5> submodules: #<hashtable size: 0> state: open root: #< name: () exports: #<hashtable size: 0> defs: #<hashtable size: 0> submodules: #<hashtable size: 7> state: detached root: #f>> name: atomic-box?> 2. #<&source file: “hoot/errors.scm” line: 95 column: 22>

I don’t quite understand what this could be caused by.

I’m not sure, either. The runtime module system is work-in-progress and should be considered unstable currently. We plan to use it to build a REPL that will ship with Hoot and work out the remaining major bugs but we haven’t done so yet.