If I have a directory structure like this:
src
├── Commands.elm
├── Decoders.elm
├── Main.elm
├── Messages.elm
├── Models.elm
├── Page
│ ├── Cats
│ │ ├── Main.elm
│ │ ├── Style.elm
│ │ └── ...
│ ├── Pieces
│ │ ├── Main.elm
│ │ ├── Style.elm
│ │ └── ...
│ └── Players
│ ├── Main.elm
│ ├── Style.elm
│ └── ...
├── Routing.elm
├── Style
│ ├── Index.elm
│ ├── MainCss.elm
│ └── Main.elm
├── Update.elm
└── View.elm
I found some examples that show how to import a module from a directory, but I couldn't find an example on how to import a module from a sub-driectory.
For example, how do I import Page/Cats/Main.elm
in View.elm
?
In Python I would put a __init__.py
into each nested directory to turn them into packages which would allow me to reach the modules in them like this from Page import Cats
or like this from Page.Cats import Main
. Is there a similar concept in Elm?