haddock suggestion -- %{FILE}

Conal Elliott conal at conal.net
Wed Jan 17 04:31:00 EST 2007


I did get working again by commenting out the "-optP-P" that gets passed to
Haddock.  Now I want to eliminate my local mod.  I could easily add a
another Cabal Haddock flag that says to omit the -optP-P, but I prefer the
solution of checking the Haddock version number, since it would always do
the right thing with no intervention.  Can anyone give me hints about how to
do the version check?

 - Conal

On 1/9/07, Duncan Coutts <duncan.coutts at worc.ox.ac.uk> wrote:
>
> On Tue, 2007-01-09 at 09:32 -0800, Conal Elliott wrote:
> > The only pre-processing is what's caused by using the cabal directive
> > "Extensions: CPP".
>
> > Fiddling with flags, I see that -optP-P is the culprit.  Removing it:
> >
> > bash-3.2$ ghc -E -cpp -o z src/Graphics/UI/TV/Input.hs
> > -Dmingw32_BUILD_OS -Dmingw32_HOST_OS -Di386_BUILD_ARCH
> > -Di386_HOST_ARCH -D__GLASGOW_HASKELL__=606 -D__HADDOCK__; head -3 z
> > # 1 "src/Graphics/UI/TV/Input.hs"
> > # 1 "<built-in>"
> > # 1 "<command line>"
> > bash-3.2$
>
> > Any ideas?  - Conal
>
> So for a quick hack, modify Cabal to unconditionally omit -optP-P and
> see if that makes all your links come out right.
>
> Probably the right thing to do however is to have Cabal use the -optP-P
> option only when we're using haddock-0.7 or older (otherwise haddock-0.7
> users will get a lexical error when haddock encounters the C line
> pragmas).
>
> I think at the moment Cabal doesn't check haddock's version number at
> all. So that's something to look at if you or anyone else want to come
> up with a patch for this.
>
>
> Duncan
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/libraries/attachments/20070117/1f50c5f4/attachment-0001.htm


More information about the Libraries mailing list