[email protected]
[Top] [All Lists]

Re: [Haskell-cafe] GHC bug? Cabal bug? Haddock bug?

Subject: Re: [Haskell-cafe] GHC bug? Cabal bug? Haddock bug?
From: David Waern
Date: Fri, 22 Jan 2010 23:39:43 +0100
2010/1/17 Mark Lentczner <[email protected]>:
> AHA!
>
>> Note that after running "cabal haddock" we re-build all of our .hi and
>> .o files EXCEPT ./dist/build/HSsyb-with-class-0.6.1.o
>>
>> And now, since TH generates random symbols, we have symbols in the new
>> .hi files that aren't in the old (and only) HSsyb-with-class-0.6.1.o.
>
> So, this leaves us with two questions:
>
> 1) Why does "cabal haddock" rebuild the .hi and .o files? On the face of it, 
> this seems odd: Build documentation and your library gets rebuilt?

Maybe this has already been answered elsewhere: when TH is involved
Haddock may rebuild your library. In this case Cabal is directing
Haddock's output to the same place that is used for normal builds.
This bug has been fixed in Cabal.

> 2) Why doesn't Instances.o get rebuilt? Surely this has something to do with 
> the fact that Instances.hs contains only orphan instances. But any answer 
> here just leads to a raft of other questions:
>        Surely this problem would plague other modules have have similar 
> source files?
>        What is Haddock doing?
>        If Haddock needs the .hi files, why not just use them?
>        If it just "builds them to be sure", why in the dist tree and not some 
> place temporary?
>        If is going to build .o files, why not all?

Not sure why Instances.o isn't rebuilt.

David
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

<Prev in Thread] Current Thread [Next in Thread>