[Haskell-cafe] optional ghc-options based on GHC version?

Mateusz Kowalczyk fuuzetsu at fuuzetsu.co.uk
Fri Sep 19 01:22:03 UTC 2014


On 09/18/2014 04:33 AM, Ivan Lazar Miljenovic wrote:
> Something like this:
> 
> 
>         if True
>            Ghc-Options: -O -Wall
> 
>         if impl(ghc >= 7.8.1)
>            Ghc-Options: -flate-dmd-anal
> 
> (I'm not sure if the "if True" hack is still needed, but at one stage it was.)
> 
> On 18 September 2014 12:38, Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> wrote:
>> Hi,
>>
>> I have a project here where GHC's option -flate-dmd-anal gets out some
>> extra speed but the flag is not available on 7.6.3. How can I specify in
>> the cabal file that I only want to pass this through when building with
>> 7.8.3 or newer? It'd be a shame to not take advantage of the extra speed
>> on 7.8.3 just because we want to support 7.6.3 too for a bit longer. I
>> was unable to find the info online.
>>
>> Thanks.
>>
>> --
>> Mateusz K.
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
> 
> 
> 

Seems to work great, thanks.

-- 
Mateusz K.


More information about the Haskell-Cafe mailing list