CountOren
CountOren

Reputation: 874

Adding helper function for both foundation and handlers

I want to add an helper function to my yesod app that will "live" in a seperate file and could be imported in both foundation file and the handlers, i dont want to have reimport all the modules again. and i cant use the Import module because im getting circular dependencies ( Import -> helper -> foundation -> Import).

Upvotes: 0

Views: 139

Answers (2)

Venge
Venge

Reputation: 2437

I think rather than messing around with mutually-recursive modules it might be better to just re-import all the stuff from Import that you want.

Upvotes: 1

Daniel Wagner
Daniel Wagner

Reputation: 153172

The GHC manual has a section on mutually recursive modules.

Upvotes: 1

Related Questions