[racket] Cycles when loading modules

From: Joe Snikeris (joe at snikeris.com)
Date: Tue Oct 26 10:56:43 EDT 2010

Hi all,

I've encountered:

standard-module-name-resolver: cycle in loading at...

I understand the issue; however, I'm not sure how to resolve it while
maintaining good design.  Perhaps my idea of good design is flawed.
Anyway, I'm working on a problem from SICP [1] that involves several
objects: primitive constraints (such as adders, multipliers,
constants) and connectors (which connect primitive-constraints

I have the primitive constraint procedures defined in one file, and
the connector procedures in another.  The connectors use procedures
that operate on primitive constraints and the primitive-constraints
use procedures that operate on connectors.

So there is a need to require the definitions for connectors in the
primitive constraint file, and vice versa.

For example, the connectors call a procedure (inform-about-value
constraint) that I've defined in the primitive constraint file, since
it operates on constraints.

Any advice?

Thanks in advance,

[1] - http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-22.html#%_thm_3.33

Posted on the users mailing list.