It looks like the argument order for newForeignPtr was swapped between ghc-6.1 and ghc-6.2. So, I used conditional compilation to check the version number but it looks as though __GLASGOW_VERSION__ in 6.1 and 6.2 is still set to 601. -- Alastair Reid