[plt-scheme] circular requires...

From: Carl Eastlund (carl.eastlund at gmail.com)
Date: Mon Mar 22 17:40:35 EDT 2010

On Mon, Mar 22, 2010 at 5:37 PM, Todd O'Bryan <toddobryan at gmail.com> wrote:
> Is there an easy way to avoid circular requires, or do I just need to
> put everything that refers to itself in one module?
>
> I'm trying to keep my files fairly short, but keep getting thwarted.
>
> Todd

The unit system allows cyclic linking.  You can decide how you want to
split things up, put signatures for all those parts in one file, then
put a unit for each of those in a separate file, and have each import
the signatures for all the rest.  Then you can link them all together
in one last file, and the linking will hook up the cyclic dependencies
for you.  However, the module dependencies will be a DAG: the linking
module imports all the unit modules, and the unit modules all import
the signature module, and that's it.

--Carl


Posted on the users mailing list.