[Haskell-cafe] Re: [Haskell] ANNOUNCE: first Grapefruit release

Wolfgang Jeltsch g9ks157k at acme.softbase.org
Mon Feb 16 08:11:36 EST 2009

[redirecting to haskell-cafe]

Am Sonntag, 15. Februar 2009 00:25 schrieben Sie:
> Hi Wolfgang,
> I was wondering if I can use FLTK as GUI backend for Grapefruit?

This should be possible in principal. It just could be that my assumptions 
about how widgets are created and composed were too tight so that 
Grapefruit’s general interface doesn’t fit FLTK. In this case, please just 
tell me and I will try to make the interface more general.

> I believe for this to make it happen, I would have to output FLTK's C++
> into C then create bindings for Haskell (via FFI).  Is that doable or an
> quite tall order?

Recently, a student of mine has written a program which generates a Haskell Qt 
binding fully automatically from Qt header files. The generated binding 
consists of three layers. The first layer is C++ code which reexports Qt’s 
functionality as a pure C interface. The C interface is ugly for humans and 
not type safe (because C doesn’t know classes). The second layer consists of 
a couple of FFI declarations. The third layer is Haskell code which provides 
a nice interface similar to the original C++ interface.

I still have to get the source code of the binding generator from that student 
but I hope this will happen soon. I want to publish it then on the web. It 
hope that it is possible to reuse this binding generator for other C++ 

> Jamie Clark

Best wishes,

More information about the Haskell-Cafe mailing list