Bertram Felgenhauer wrote: > 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)])) >
Oops, your right :) I made a bunch of different changes and when I was cherry picking them to put into individual patches I must have missed that. I'll just go ahead and push the patch, so configure.ac won't be broken any more. > gnomevfs/System/Gnome/VFS/Error.hs is missing from this patch. > I've amended the patch to include that as well. > [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. > For posterity. :) That could be removed, I suppose. I left it in for older versions just to make sure I had the same behavior while I was testing it. >> 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.) > It was faster to just do some floating point math than to write a function to count the number of bytes. :) I know it will fail if the integer is big enough to overflow a double (which might actually happen for a constant like MAX_UINT64 or similar). I'll rewrite that part before pushing the patch. Your version doesn't seem to handle negative numbers, is that correct? I guess when I rewrite that part I'll combine our versions, that way both problems would be fixed. > 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. > Both gstreamer and the docs build fine for me. Pete ------------------------------------------------------------------------- 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
