Circular Module Imports in Guile

How do I load two guile modules that #:use-module each other in the REPL? Apologies if this is in bad form either because it is plain from the manual (I sure hope not, I’ve consumed the chapter on modules a number of times, albeit with skipping over what appeared to be dead ends on this head) or it admits of bad programming style. I am successful in loading them if I forcefully load them one after the other (a relies on b, load a, REPL complains of a not having loaded b, load b, load a), but I would like to be able to run some file that just loads a bunch of guile files that each define a module without running into errors. I appreciate any insight had on this. Thank you.

The origin of this error can be traced to the abject inability to read. All that was required was to read the following page with a third grader’s reading comprehension.

When the REPL complained “no code for module x” I incorrectly assumed this was because of a circular dependency I had introduced. But the problem was not with the structure or content of the module itself, or any interplay of the modules I created, but rather with the REPL’s ability to find the module (as the REPL explicitly stated). Once I organized my modules in compliance with the directives found in the linked page, as well as altered the load path to include the directory where I placed these modules, all was resolved. Very briefly:

I had modules (guile a), (guile a b), (guile a c), …, (guile a n), but defined the following directory layout:

./{a.scm,b.scm,c.scm,...,n.scm}

and did nothing to alter the load path.

After rearranging to:

./guile/a.scm
./guile/a/{b.scm,c.scm,...,n.scm}

and altering the load path via:

(add-to-load-path (getcwd))

where the REPL was spawned in ./ and then loading the files, no error was reported and all modules were correctly loaded. I blame Instagram reels for rotting my brain and burning a hole the size of tennis ball in Broca’s and Wernicke’s areas that inhibited me from parsing the English language.