infelicitous (incorrect?) ordering of flags passed to GHC

Duncan Coutts duncan.coutts at
Sun Jan 10 13:27:51 EST 2010

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.

> And are there any workarounds in the meantime? 

Have you tried listing the fields in the other order?

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



More information about the cabal-devel mailing list