# Init a task in a module + avoid circular import?

**URL:** <https://discourse.elm-lang.org/t/init-a-task-in-a-module-avoid-circular-import/6287>\
**Category:** Learn\
**Created:** [September 18, 2020, 12:02am UTC](https://discourse.elm-lang.org/t/init-a-task-in-a-module-avoid-circular-import/6287 "2020-09-18T00:02:39Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Yannick971](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/yannick971/32/3419_2.png) [@Yannick971](https://discourse.elm-lang.org/u/Yannick971)\
**Post date:** [September 18, 2020, 12:02am UTC](https://discourse.elm-lang.org/t/init-a-task-in-a-module-avoid-circular-import/6287/1 "2020-09-18T00:02:39Z")

</div>

Newbie question… There is a value from the model of `Main.elm` that I would need to access in a module, the module being itself imported in Main…hence the circular import…  
is there a way around this, or I just have to rethink my design?  
I believe it’s the latter…

At first, I wanted to have this value computed in the module, not in `Main`, but I needed it to be initialized on the app startup. (This value is computed from the current time, to give you context).  
Is there a way to initialize this task in a module, on app startup? I guess so but I couldnt figure it out. Can I just use `init` without `view`? Is there something like `view.None` to tell Elm there is no view here ?

So I ended up doing this in the `Main init` and it created this circular import bug because I was importing the value from Main into the module…

---

_[View the full topic](https://discourse.elm-lang.org/t/init-a-task-in-a-module-avoid-circular-import/6287)._
