Subject: Re: Fwd: cabal-make almost ready
From: "Conal Elliott" <[email-masked]>
To: "Isaac Jones" <[email-masked]>
Date: Sat, 3 Feb 2007 22:25:27 -0800

Thanks, Isaac.  I looked around some (not a lot) and didn't find the source
of the slash reversal.  I decided to work around the problem using a simple
sed invocation in my cabal-make.

The attached patch adds the {en,dis}able-use-packages flags for haddock and
takes care to use -optP-P with haddock only if haddock is pre 0.8, so that
with >=0.8, haddock will track the source file names in spite of
pre-processing.

When you let me know that these patches are in integrated, I'll release
cabal-make.  If you'd like to take a look before then, just let me know.

Cheers,  - Conal

On 2/3/07, Isaac Jones <[email-masked]> wrote:
>
> The only code I can think of that converts slashes into back-slashes
> would be the FilePath code.  If some xxx-args flags are expecting a
> FilePath, I can see how that would happen.  It would be smart if
> FilePath could notice when it's a URL and not a /path/like/this, but
> that might be a significant expansion of its capabilities.  Maybe a
> simple test would suffice.
>
> peace,
>
>   isaac
>
>
> "Conal Elliott" <[email-masked]> writes:
>
> > Hi Isaac.
> >
> > I'd like to get my cabal tweaks working again & checked in, to share
> with
> > all.  And I'm still hung up on this one issue of slash-reversal.  Do you
> > have any suggestions?
> >
> >  - Conal
> >
> > ---------- Forwarded message ----------
> > From: Conal Elliott <[email-masked]>
> > Date: Jan 24, 2007 10:51 PM
> > Subject: Re: cabal-make almost ready
> > To: cabal-devel <[email-masked]>
> >
> > Do forward slashes get turned into backslashes for xxxx-args arguments
> in
> > Windows?  Could someone point me to the code that does it?  I could add
> a
> > setup flag that disables the translation, or maybe detect the "http://"
> and
> > just preserve what looks to be URLs.
> >
> > BTW, cabal-make now has a target that auto-subscribes to all wiki talk
> pages
> > generated for a project.
> >
> >  - Conal
> >
> > On 1/22/07, Conal Elliott <[email-masked]> wrote:
> >>
> >> I've been working on some haddock-related Cabal tweaks and a "make"
> >> include file called "cabal-make", which manages syntax coloring (vis
> >> hscolour) with links from the haddock docs, web-based links to other
> >> libraries, and wiki-based user comments.  It's ready to release for
> others'
> >> use except for one problem (as mentioned below).  The --haddock-args
> flag
> >> ends up turning my forward slashes into backslashes (on my WinXP
> machine),
> >> so all of the web links are broken.  I'd appreciate suggestions about
> this
> >> problem.
> >>
> >> You can find an example doc generated by cabal-make (a previous
> >> implementation that didn't quite fit cabal) at
> http://darcs.haskell.org/packages/TV/doc/html/Interface-TV-Output.html
> >> .  Suggestions welcome.
> >>
> >> - Conal
> >>
> >> ---------- Forwarded message ----------
> >> From: Conal Elliott < [email-masked] >
> >> Date: Jan 19, 2007 5:18 PM
> >> Subject: Re: [Conal Elliott] Re: getting cabal to pass more info to
> >> haddock
> >> To: Isaac Jones < [email-masked]>
> >> Cc: cabal-devel < [email-masked]>
> >>
> >> Hi Isaac.  Now I see why the patch file was empty.  And after some
> >> head-scratching about your note below, I'm glad the patch was empty.  I
> >> hadn't noticed the --xxx-args flags for configure, and instead added a
> new
> >> haddock flag.  Giving a flag to configure makes a lot more sense.
> >>
> >> So now I have just a new pair of flags enable-use-packages &
> >> disable-use-packages, which control whether haddock gets
> >> automatically-generated --use-package flags.
> >>
> >> My makefile are now performing this sort of incantation:
> >>
> >> ./setup configure --disable-use-packages --haddock-args="\
> >>   --read-interface=
> http://haskell.org/ghc/docs/latest/html/libraries/base,c:/ghc/ghc-6.6/doc/html/libraries/base/base.haddock
> >> \
> >>   --read-interface=
> http://haskell.org/ghc/docs/latest/html/libraries/mtl,c:/ghc/ghc-6.6/doc/html/libraries/mtl/mtl.haddock\
> >>   "
> >>
> >> The only problem is --haddock-args ends up turning my forward slashes
> into
> >> backslashes, so all of the web links are broken.
> >>
> >> Any advice?
> >>
> >>    - Conal
> >>
> >> On 1/17/07, Isaac Jones <[email-masked] > wrote:
> >> >
> >> > Hi Conel.  Thanks for this!  It sounds like the ideas from your
> >> > makefile could be used for Hackage for generating nice Haddock :)
> >> >
> >> > There is a general meachanism for adding --foo-args for each Program
> >> > that cabal knows about; can you use this meachanism to add --foo-arg
> >> > as well, instead of special-casing for haddock?
> >> >
> >> > If you do that, can you make the help output not suck?  Currently it
> >> > does something like this:
> >> >
> >> >            --ar-args=ARGS                  give the args to ar
> >> >            --haddock-args=ARGS             give the args to haddock
> >> >            --ld-args=ARGS                  give the args to ld
> >> >            --pfesetup-args=ARGS            give the args to pfesetup
> >> >            --ranlib-args=ARGS              give the args to ranlib
> >> >            --runghc-args=ARGS              give the args to runghc
> >> >            --runhugs-args=ARGS             give the args to runhugs
> >> >            --tar-args=ARGS                 give the args to tar
> >> >
> >> > it would be nice to concerve lines with sometthing like this:
> >> >
> >> > --ar-arg=ARG       --ar-args=ARGS          give the arg or args to ar
> >> > --haddock-arg=ARG  --haddock-args=ARGS     give the arg or args to
> >> > haddock
> >> > etc
> >> >
> >> > The patch you sent seemed like an empty file to me.  Maybe I'm just
> >> > being nihilistic ;)
> >> >
> >> > peace,
> >> >
> >> >   isaac
> >> >
> >>
> >>
>