On Thu, 2007-08-23 at 11:57 +0200, Clemens Fruhwirth wrote: > Hi, > > I was about to extend Dist.Simple.Utils with a method called > mkSharedLibName, which depends on Compiler information, hence > Dist.Simple.Utils was about to import Dist.Compiler. I ran into this > dependency loop: > > Module imports form a cycle for modules: > Cabal-1.1.7:Distribution.Compiler > imports: <..> Distribution.Program <...> > Cabal-1.1.7:Distribution.Program > imports: <..> Distribution.Simple.Utils <..> > Cabal-1.1.7:Distribution.Simple.Utils > imports: <..> Distribution.Compiler <..> > make: *** [.depend] Error 1 > > After a short discussion on #ghc, Esa Ilari Vuokko explained that > Dist.* is not supposed to depend on Dist.Simple.*, so it seems > reasonable to break the dependency cycle at "Program -> Simple.Utils".
Actually, I think Program and Compiler (though perhaps not CompilerFlavour) should move under Simple. These two modules are intimately connected with the simple build system, they're not just declarative information like the rest of Distribution.* So then it'd be ok for them to use Utils. If mkSharedLibName needs Program then I don't think should go in Utils. Why does it need Program? Perhaps those functions for constructing file names should go in the InstallDirs module. Duncan _______________________________________________ cabal-devel mailing list [email protected] http://www.haskell.org/mailman/listinfo/cabal-devel
