Me: "I should split up this module"
This module: "Good idea... now get ready for CIRCULAR MODULE DEPENDENCIES"
Me: :oh_no:

In this case: templates depend on routes depend on views depend on templates

Follow

I wasted a bunch of time on this, but I did figure out how to do it. The right way to do it:

- pages.rkt (the controllers) lazily imports the templates and routes. This file has to be lazily importing the others and not the reverse, because the controller functions are actually used to reverse look up the routes. Every template imported in pages.rkt unfortunately needs to be manually listed.
- routes.rkt imports pages.rkt directly
- templates.rkt imports pages.rkt and routes.rkt directly

Sign in to participate in the conversation
Octodon

Octodon is a nice general purpose instance. more