[Haskell-cafe] Build regressions due to GHC 7.6

wren ng thornton wren at freegeek.org
Thu Aug 30 19:24:34 CEST 2012


On 8/30/12 10:26 AM, Erik Hesselink wrote:
> Note that this does not work if you want to support multiple versions
> of GHC, and might not work in general, since
>
> * The hiding of catch is needed for preludes that still have it, since
> otherwise it will probably conflict with the one from
> Control.Exception.
> * Older versions do not have constructors for the FFI types, leading
> to warnings (or errors, I'm not sure).

In 6.12, they're warnings. And those warnings only show up with -Wall 
enabled. Though there does not appear to be an appropriate -fno-warn-foo 
to disable only these warnings while leaving the rest of -Wall intact. 
(If anyone knows of such a flag in 6.12, I'd be much obliged.)


> * Packages might not work with the new bytestring version, since the
> API has breaking changes (although they're supposed to be minor).
>
> For the first two, you need to add some CPP, for the last, you need
> actual testing.

Actually, that can be more problematic than you suspect. In particular, 
hsc2hs does not play nicely with Cabal's MIN_VERSION_foo(1,2,3) macros. 
So if you're using hsc2hs, which is common for certain FFI uses, then 
you have to put up with the warnings or rely on the __GLASGOW_HASKELL__ 
macro in lieu of the MIN_VERSION_foo(1,2,3) macros. It's doable, but 
it's uglier and more hackish than it ought to be.

-- 
Live well,
~wren



More information about the Haskell-Cafe mailing list