Am Freitag, 3. November 2006 11:37 schrieb Ross Paterson: > Fri Nov 3 02:35:59 PST 2006 Ross Paterson <[EMAIL PROTECTED]> > * fill in Image routines in X11 (#982 from Frederik Eaton) > > M ./Graphics/X11/Types.hsc +12 > M ./Graphics/X11/Xlib/Misc.hsc -11 +7 > M ./Graphics/X11/Xlib/Types.hsc -1 +9 > M ./X11.cabal -1 +2 > [...]
FYI: I've made this patch compile by telling the X11 headers to use normal prototypes (not macros) for the image functions. In addition I have 3 remarks about the X11 package: * Strictly spoken, the majority of types are wrong: An Int is not a CInt, and the binding will fail on platforms where the actual representation is different. There should be a general code review of all the types in the "foreign import"s. * Even if the point above is fixed, the X11 binding is not really typed, because tons of things are simply Ints (or better: CInts) and X11 constants are not Haskell constructors but simply integral values. caused by the use of "type" instead of the more correct "newtype". This can be fixed by a little bit of more or less mechanical work, but it will of course introduce an incompatible API change on the Haskell side. What do other people think about this direction? * The use of hsc2hs is not really needed, because the X11 prototypes and #defines are fixed for all eternity because of ABI issues. This situation is quite similar to OpenGL: There are different implementations, but they all have to agree on a single ABI. Cheers, S.