Peter Gavin wrote: > Bertram Felgenhauer wrote: > [snip] > Well, here's my patch. Everything seems to work correctly, so I'll just > push it into the repo tonight, if no one objects.
>> I didn't like having to sprinkle even more #ifdefs all over the place, >> and as long as we want to be backwards compatible with ghc 6.8 and 6.6 >> (and 6.4?) there seemed to be little point in using the new Exception >> mechanism. > > It turns out there are only a few files that needed changing for this, btw. Well, I grepped for Control.Exception and got discouraged. Looking at your patch it's indeed smaller than I expected. >> There's a small cleanup to the GHC_PKG_CHECK macro in acinclude.m4 that >> I'd like to keep, but I can seperate that out into its own patch. > > I think I fixed the same thing in a different patch. That one I just > pushed into the repo. Right. And it even does the --user handling that I left out (because it was not implemented properly before either). Some comments about your patches: [snip] > [add HAVE_NEW_CONTROL_EXCEPTION define to configure.ac; modify several files > to import OldException when it's defined > hunk ./configure.ac 221 +GTKHS_PROG_CHECK_VERSION($PKG_BASE_VERSION, -ge, 4.0, is missing here; it ended up in the wrong patch. (Which means that, right now, the HEAD configure.ac is broken) > +AC_DEFINE(HAVE_NEW_CONTROL_EXCEPTION,[1],[Define if you have the new > Control.Exception module (from GHC 6.10)])) gnomevfs/System/Gnome/VFS/Error.hs is missing from this patch. [snip] > [update tools/c2hs/base/general/Binary.hs to work with GHC 6.10 > hunk ./tools/c2hs/base/general/Binary.hs 75 > +# if __GLASGOW_HASKELL__<610 > hunk ./tools/c2hs/base/general/Binary.hs 77 > +# else > +import Control.OldException ( throwDyn ) > +# endif That should be in the Control.Exception patch. > hunk ./tools/c2hs/base/general/Binary.hs 483 > +#if __GLASGOW_HASKELL__<610 Is there any reason to keep the old instance? Performance doesn't appear to be an issue. > hunk ./tools/c2hs/base/general/Binary.hs 559 > + > +#else > + > +instance Binary Integer where > + put_ h n = do > + put h ((fromIntegral $ signum n) :: Int8) > + when (n /= 0) $ do > + let nBytes = byteSize n > + put h (fromIntegral nBytes :: Word64) > + let n' = abs n > + mapM_ (putByte h) [ fromIntegral (n `shiftR` (b * 8) .&. 0xff) > + | b <- [ nBytes-1, nBytes-2 .. 0 ] ] > + where byteSize n = > + -- add one in case of rounding errors > + ceiling (logBase (fromInteger n) 256.0) + 1 Yuck for using floating point math here. (I prefer my own instance, because I think it's simpler. But I can't claim objectivity, and it really doesn't matter - c2hs is only used while building after all.) [snip] Apart from the missing gnomevfs/System/Gnome/VFS/Error.hs update, gtk2hs builds fine for me with those patches. I have not built gstreamer nor the documentation. Bertram ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Gtk2hs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel
