On Fri, Jan 30, 2009 at 06:40:29PM -0600, Austin Seipp wrote: > Excerpts from John Goerzen's message of Fri Jan 30 18:31:00 -0600 2009: > > Why would cabal-install select a different base than running Setup > > manually? > > > > I can't hard-code base >= 4 into .cabal because that would break for > > GHC 6.8 users. I have CPP code that selects what to compile based on > > GHC version. > > > > -- John > > I think it would be easiest to simply not use CPP and set a dependency > on the extensible-exceptions package: > > http://hackage.haskell.org/cgi-bin/hackage-scripts/package/extensible-exceptions > > Using this package, you don't need CPP at all - just import > 'Control.Exception.Extensible' instead of Control.Exception and you're > done. This package works under both ghc 6.8 and 6.10 (when compiled > under 6.10, it just re-exports all of Control.Exception, and on <= > 6.10 it actually compiles the code) and means you don't have to have > two awkward copies of the same code that use different > exception-handling mechanisms.
Interesting. In its cabal file, I see this: if impl(ghc>=6.9) cpp-options: -DUSE_NEW_EXCEPTIONS build-depends: base>=4&&<5 else build-depends: base<4 interesting, that. Either: 1) Everyone will have the same problem or 2) That magic somehow disables the cabal-install voodoo that's messing everyone up. If it's #1, it doesn't help us. If it's #2, I could do the same thing in HDBC. Can anyone try to cabal-install extensible-exceptions on GHC 6.10 and let me know what happens? To be sure, I already had to use CPP for much of HDBC due to Hugs issues. I have a small bit of code in HDBC itself to deal with the interface differences, and then the backend drivers mostly don't have to care. They can call throwSqlError which uses throwDyn or throw as appropriate, and they can just be fine. It is probably not necessary to introduce another dep for the sake of saving as few lines of code as this. -- John _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe