[Haskell-cafe] what GUI library should i select?

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Mon Nov 13 08:10:03 EST 2006

On Mon, 2006-11-13 at 15:41 +0300, Bulat Ziganshin wrote:
> Hello Duncan,
> Monday, November 13, 2006, 3:36:32 AM, you wrote:
> >> afaik, there are just two good enough libs - wxHaskell and GtkHs. can
> in brief, i see the following main differences:
> - wxHaskell is easier to understand and to use, Ght2Hs allows to use
> Glade to develop "look&feel"

Easier to understand is rather a matter of personal taste. Certainly Gtk
is a big library, providing lots of features. I should also note that
one of the main improvements in the upcoming Gtk2Hs release will be to
try to simplify the api and improve the reference documentation by
making greater use of atribute and signal abstractions rather than lots
of getter/setter functions.

> - Gtk2Hs had better support, but now wxHaskell has more maintainers and
> situation may change to opposite in a next few months

It'll be good to have more competition :-) hopefully both systems will
improve more rapidly.

> - wxHaskell provides more native look&feel, while Gtk2Hs simplifies
> porting of GUI application from Windows to Linux. Also Gtk2Hs needs Gtk
> DLL to be installed, but this can be made a part of application
> installation procedure, afaik?

Both Gtk2Hs and wxHaskell need DLLs to be installed and in both cases it
can be made part of the install procedure. You just need to bung the
right set of dlls in the same directory as the .exe that you distribute.
It's exactly the same as with any other windows app that needs extra

> - Gtk2Hs has better memory management
> - differences between Gtk and wxWidgets that i will go to study
> i also have more questions: first, how about tabbed pages control?
> such controls are widely used to represent plenty of information in
> limited screen space

Both have tab controls.

> second: ability and easiness to develop my own controls, and to
> combine several customized controls together to make one
> "supercontrol" (although i guess that last feature is important only
> for RAD environments)
> third: are there any "appetizers" demonstrating features of each
> library and with source code available for studying? except for
> memory.pdf which don't mention where full source can be downloaded

There are a bunch of demos included in the Gtk2Hs sources and there are
various apps written by other people available on the web.

For example:


Apart from the memory pdf intro there a general intro presentation and a
glade tutorial:


> it will be interesting to see sources of more "business-like"
> applications developed with both libs. if there are no ones, may be i
> will develop basic file manager utility as such appetizer

That would be great.


More information about the Haskell-Cafe mailing list