Réf. : [Haskell-cafe] Re: circular imports

Johannes Waldmann waldmann at imn.htwk-leipzig.de
Tue Sep 7 10:23:45 EDT 2010

Henning Thielemann <schlepptop <at> henning-thielemann.de> writes:

> As I see there is no cycle in the types. How about defining Game, Rule,
> Obs in private modules, like Private.Game, Private.Rule, Private.Obs,
> and implementing the functions in public modules like Game, Rule, Obs ?

I guess that conflicts with the advice of putting the
functions (behaviour) close to the data that it concerns.

But if a function mentions two types (and the types are separate),
it requires a decision -  in OO as well: you would (arbitrarily) 
make them a method of one class or the other.


More information about the Haskell-Cafe mailing list