[Haskell-cafe] what GUI library should i select?
Luis F. Araujo
luis at arjox.org
Mon Nov 13 13:14:54 EST 2006
Iván Pérez Domínguez wrote:
> Neil Mitchell wrote:
>> Hi Bulat,
>>> afaik, there are just two good enough libs - wxHaskell and GtkHs. can
>>> anyone point (or write) detailed comparison of their features? i plan
>>> to write large GUI program in Haskell and want to select best one.
>>> the requirements that i can imagine at this moment is the following:
>> I used to use wxHaskell.
> So did I. I tried gtk2hs as well. In my experience, gtk2hs is more
> complicated. On the other hand, gtk2hs supports glade, I think.
OK, i feel like i need to give my personal opinion about this.
I have been using Gtk2Hs since a bit more of a year now, and though
i don't consider myself a GUI guy, i gotta say it _has_ been very easy
to use for me.
Most of the operations while reasoning in terms of the gtk2hs API
summarizes up on:
- Creating windows
- Creating and adding containers into these windows with a specific layout.
- Creating and adding objects (widgets) inside these containers.
- Link widget-specific events with Haskell functions implementing the
Each of these general operations translate to very well defined functions,
making it a very concise and easy-to-use API imho; plus you have
the automatic garbage collection feature.
Besides that, you have plenty of very good documentation on the gtk2hs
even with a hoogle interface to search on the API.
I really don't see where it is the complicated part.
> wxHaskell seems to be easier to understand and to use. In my case, I
> took a reversi game from haskell.org and did a sudoku game in a few
> weeks (with no prior knowledge on wxHaskell).
> I wanted to write a GUI program using GHC
>> 6.4.2 and was (disturbingly) shocked to find out that _neither_ of the
>> GUI toolkits had prebuilt packages that worked on Windows with GHC
>> 6.4.2. I complained and within a day Duncan had done one for Gtk2Hs,
>> and to my knowledge wxHaskell still doesn't have such a packaged
> I'm using Gentoo Linux. We obviously don't use prebuilt packaged
> versions, but installing it is just doing "emerge wxhaskell" and
> 'playing the... waiting game'. Gtk2hs support under Gentoo is mostly
> missing (the package is included, but doesn't work at all).
We even have a gtk2hs darcs repository (optional to the stable package)
version available on
Gentoo through the Haskell overlay.
Though we appreciate if you give us more detail about the 'missing' support.
>> For this reason, I would recommend Gtk2Hs - the level of support and
>> maintainership is far better than wxHaskell at the moment. I
>> appreciate wxHaskell has new maintainers, but when picking a GUI
>> toolkit where you can't easily switch later, currently maintained is a
>> big bullet point for me!
More information about the Haskell-Cafe