[Haskell-cafe] Cabal rebuilding all of the C++ code for wxHaskell
dukedave at gmail.com
Wed Oct 5 19:54:34 CEST 2011
On 30 September 2011 03:02, Claude Heiland-Allen <claude at goto10.org> wrote:
> On 30/09/11 02:45, DukeDave wrote:
>> 1. Is there some reason (other than 'safety') that "cabal install" cleans
>> everything up?
> As far as I've experienced and understand it, it doesn't - it's more that
> GHC can detect when Haskell modules don't need recompiling while the same is
> not true for C or C++ sources. For example, I change one module and see GHC
> report only that module and its dependents being recompiled, while the other
> compiled modules are reused from previous 'cabal install' runs. The
> "C-sources:" are recompiled every time even if unchanged, which I too find
> it somewhat annoying even with my small projects.
Excellent, that is consistent with what I'm seeing, and I'm glad I'm
not the only one who finds it annoying.
I have no familiarity with how cabal and GHC handle C-sources, but I
presume that the job of building them is handed off to a local C/C++
compiler (I presume g++ in my case).
Given this I can only assume that cabal is doing something:
1. Deleting the object files before calling the C compiler (and so
everything must be rebuilt)?
2. Touching the source C files in some way, before calling the C compiler?
3. Passing some argument to the compiler which is telling it to
4. Something else?
>> 2. Why does setting cleanHook to return () not have any effect?
> I think becausae the clean hook is probably not called by 'cabal install',
> but by 'cabal clean'.
Ah yes, that does make sense, my bad.
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe