infelicitous (incorrect?) ordering of flags passed to GHC

Brent Yorgey byorgey at
Mon Jan 11 10:15:51 EST 2010

On Sun, Jan 10, 2010 at 06:27:51PM +0000, Duncan Coutts wrote:
> On Thu, 2010-01-07 at 15:18 -0500, Brent Yorgey wrote:
> >     ghc-options:         -Wall
> >   
> >     if impl(ghc >= 6.12.1)
> >       ghc-options:       -fno-warn-unused-do-bind
> > I would expect the arguments -Wall -fno-warn-unused-do-bind to be
> > passed to ghc-6.12.1.  However, let's see what happens:
> >  ghc [..] -fno-warn-unused-do-bind -Wall Foo
> Indeed, that's clearly wrong. The order should be the same as given in
> the .cabal file.
> > Any ideas?  Why does this happen?  How hard would it be to fix? 
> Where it gets reversed will need a little investigation. First point to
> check would be before and after finalisePackageDescription.

OK, I might take a look.

> > And are there any workarounds in the meantime? 
> Have you tried listing the fields in the other order?

Yes, with the same result.  So it's not as simple as something being
backwards.  I just had another idea for a possible workaround (even if
this gets fixed I'd rather not rely on everyone building xmonad to
have a sufficiently new version of cabal) which I will try once I get
to school.

> > Also, I'm happy to file a ticket on the bug tracker for this.
> Thanks.

Will do, I mailed first to see if people agreed this was a bug.


More information about the cabal-devel mailing list