[Haskell-cafe] n00b circular dep question

Jennifer Miller ogina at mac.com
Fri Apr 25 12:54:42 EDT 2008

Hi all,

This is my first post, and I'm a n00b, so go easy if I breach protocol. :-)

I have a graph where the nodes contain a number of fields of various types. The values for one of those fields -- call it Mass -- need to reside in a separate file from the main graph definition (this is for workflow reasons and is given to me as a constraint). In order to set the Mass for a particular node, I need access to the other fields of that node. The other constraint is that the graph needs to be available in an interpreter (eg GHCi).

So, I have a circular dependency in my modules that I don't know how to resolve in Haskell. I went looking for the equivalent of #include which is how I would have solved this in C++.  I'm sure there is a simple answer to this and I'm hoping this group can point me in the right direction. 

Many thanks,


More information about the Haskell-Cafe mailing list