On Fri, Sep 11, 2009 at 10:42 AM, David Menendez<d...@zednenem.com> wrote: > On Fri, Sep 11, 2009 at 11:26 AM, Neil Brown <nc...@kent.ac.uk> wrote: >> >> Can anyone tell me how to fix this? I don't think that changing to always >> use Control.Exception would fix this, because I need to give a different >> type for catch in base-3 to base-4, so there's still the incompatibility to >> be dealt with. > > I'd try using a cabal flag to set a CPP flag. > > E.g., from cabal > > Flag Base3 > Description: Use Version 3 of Base > Default: False > > Library/Executable > if flag(Base3) > CPP-Options: -D _BASE_3_ > Build-Depends: base >= 3 && < 4 > > else > Build-Depends: base >= 4 && < 5 > > And then do, > > #if _BASE_3_ > import qualified Control.Exception as C > #else > import qualified Control.OldException as C > #endif >
I've had success with this. See: http://hackage.haskell.org/packages/archive/uuid/1.0.2/uuid.cabal Antoine _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe