You shouldn't be making modules just to keep files smaller.  A module
should be a self-contained concept and its related functions.  In your
example, it looks like `Model` should probably go in `Subpackage`, which
would break the circular dependency.  Is there some other need you have for
putting `Model` in `Main`?  When I come across cases like this in my own
code, another common solution is to make a Subpackage.Model which may be
different from Main.Model, and have the Subpackage functions operate on
Subpackage.Model, and have Main do any translation that is necessary.

On Wed, Jul 6, 2016 at 5:31 PM, Max Goldstein <[email protected]>
wrote:

> I've had success defining common types in one module, which is imported by
> all the submodules, which are imported by main.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Elm Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to