Package dependences for building versus linking
red5_2 at hotmail.com
Fri Oct 2 15:14:00 EDT 2009
Cabal introduces unnecessary package dependences, which in one case causes a Cabal build to fail whereas ghc --make does not fail. I'm not sure whether this should be considered a bug in Cabal.
I'm trying to Cabalize a program. The executable depends on a package that can be compiled (the GHC path), but not interpreted (the GHCi path). Some of my source files use this compile-only package, and other files use Template Haskell. TH code is passed to the interpreter.
If I build using ghc --make, the TH interpreter loads only the packages needed by the current file. This works because the interpreter only runs for source files that use TH, and no file uses both TH and the compile-only package. If I build using Cabal, however, the TH interpreter attempts to load every package needed by the project, apparently because Cabal passes every package on the command line. Compilation fails because the compile-only package cannot be loaded.
Should I submit a bug report?
Hotmail® has ever-growing storage! Don’t worry about storage limits.
More information about the cabal-devel