Re: [Haskell-cafe] How to use cabal macros in .hsc files

2011-08-11 Thread Henning Thielemann

On 08.08.2011 12:08, Bas van Dijk wrote:

Hello,

Currently it's not possible to use cabal macros like
MIN_VERSION_base(x,y,z) in .hsc files:

http://hackage.haskell.org/trac/hackage/ticket/870

Is there a workaround to get the same effect?


Writing a plain Haskell module that contains the code that depends on 
the particular base-version?


Usually I try to stay away from this preprocessor hackery, and this case 
seems to support my attempts. What I do is to add Hs-Source-Dirs 
depending on some Cabal flag, and connect it with a field like 
Build-Depends: base==3.*.


http://www.haskell.org/haskellwiki/Cabal/Developer-FAQ#Adapt_to_different_systems_without_CPP


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] How to use cabal macros in .hsc files

2011-08-08 Thread Bas van Dijk
Hello,

Currently it's not possible to use cabal macros like
MIN_VERSION_base(x,y,z) in .hsc files:

http://hackage.haskell.org/trac/hackage/ticket/870

Is there a workaround to get the same effect?

Regards,

Bas

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe