Building GUIs for Haskell programs

Hello! I want to learn to create GUIs with Haskell. Which GUI frameworks can you recommend? Thanks Dmitri Pissarenko -- Dmitri Pissarenko Software Engineer http://dapissarenko.com

You will find this page useful for finding libraries: http://www.haskell.org/libraries/ As for GUI stuff, I believe wxHaskell is the most actively maintained toolkit, and probably your best bet. Alistair.
Hello!
I want to learn to create GUIs with Haskell.
Which GUI frameworks can you recommend?
Thanks
Dmitri Pissarenko

Here is an answer from a newbie at both Haskell and GUI -- I don't think there is a simple answer. It probably depends on your experience, your development platform, and where you want to be able to distribute your application to. I would say that wxHaskell is probably a good choice. It depends on wxWindows, which seems to be fairly well developed, and is said to work on all reasonable platforms. Here is my story: I've done little GUI programming -- some MS Visual C++ and visual basic years ago, a little perlTK more recently. I have some familiarity with TCL/TK from my perlTK experience. I'm developing on a Linux platform (Slackware 9) and have GHC 6.2.2. I looked at, and tried several of the Haskell libraries as listed at http://www.haskell.org/libraries/#guis Because of my previous experience with TCL/TK, I wanted to use a TK based solution initially. I had problems (I've forgotten what :-) with TCLHaskell, and went on to HTk. The HTk package seems pretty nice, but probably because of my inexperience with Haskell, I found it difficult to understand. wxHaskell seems to be the most popular vehicle, so I decided to look into it, partly based on some advice I got from this list. I had no trouble compiling and installing wxWindows (specifically, wxGTK-2.4.2). I also compiled from source wxHaskell with no problem. Although the documentation is a bit cryptic (for my level of experience, at least), and even though I have no past experience with wxWindows, I am able to figure out how to do what I want to do, so far. So, based on my experience, I can recommend wxHaskell. Best regards, John Velman On Tue, Jan 11, 2005 at 09:05:43PM +0100, Dmitri Pissarenko wrote:
Hello!
I want to learn to create GUIs with Haskell.
Which GUI frameworks can you recommend?
Thanks
Dmitri Pissarenko -- Dmitri Pissarenko Software Engineer http://dapissarenko.com _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Hello!
I don't think there is a simple answer. It probably depends on your experience, your development platform, and where you want to be able to distribute your application to.
My goal behind experimenting with Haskell-based GUIs is to determine whether UI development in Haskell is much "better" (for instance, simpler, testable, maintainable) than in an imperative language. Up to now I have the impression that there are lots of things, which one can do in Haskell easier than in an imperative language. IMO user interfaces are very hard to test in imperative language. One needs to be very disciplined in order to test the behaviour of UIs thoroughly. It is possible, for instance, using the Abbot framework in Java, but it requires so much effort that, in most cases, I a) either don't write the test case for a UI behaviour, or b) write a test case on the "non-UI" part, which would fail, if the UI behaviour would work in a wrong way. For instance, imagine you want to test that a table contains value X in row Y and column Z. You can display this table, then navigate to the cell in the table and look what value is displayed there. This is hard. In most cases, I test the component, which is responsible for providing data for display (in Java they are called table models). A table model is just a class, which you can test with plain JUnit without any special extensions. So I want to try to write a GUI in Haskell and then decide whether writing GUIs in Haskell is really much better than writing them in an imperative language. Best regards Dmitri Pissarenko -- Dmitri Pissarenko Software Engineer http://dapissarenko.com

Dmitri Pissarenko wrote:
My goal behind experimenting with Haskell-based GUIs is to determine whether UI development in Haskell is much "better" (for instance, simpler, testable, maintainable) than in an imperative language.
You might also be interested in wxFruit... http://zoo.cs.yale.edu/classes/cs490/03-04b/bartholomew.robinson/ ...although still a research project, it takes a more functional approach to GUI's. Greg Buchholz

Hi,
I can recomment wxHaskell [1]
Georg
[1] http://wxhaskell.sourceforge.net/
On Tue, 11 Jan 2005 21:05:43 +0100, Dmitri Pissarenko
Hello!
I want to learn to create GUIs with Haskell.
Which GUI frameworks can you recommend?
Thanks
Dmitri Pissarenko -- Dmitri Pissarenko Software Engineer http://dapissarenko.com _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- ---- Georg Martius, Tel: (+49 34297) 89434 ---- ------- http://www.flexman.homeip.net ---------

On Tue, 2005-01-11 at 21:05 +0100, Dmitri Pissarenko wrote:
Hello!
I want to learn to create GUIs with Haskell.
Which GUI frameworks can you recommend?
wxHaskell is good for building portable GUIs. It has an extensive selection of widgets and has a good API. gtk2hs is good for building GUIs that target the Linux/Gtk/Gnome platform (though it is portable to Windows). It is also an extensive toolkit. It allows you to visually design GUIs with the Glade user interface builder. The API style is currently more low level than that of wxHaskell or FLTK. There is also a binding to FLTK which is a much simpler, more light weight portable graphics toolkit. As far as I know, these are the only actively maintained GUI toolkits for Haskell at the moment. Duncan (gtk2hs developer)

Hello! I want to thank all list participants for answering my questions concerning GUIs and unit testing. Best regards Dmitri Pissarenko -- Dmitri Pissarenko Software Engineer http://dapissarenko.com
participants (6)
-
Alistair Bayley
-
Dmitri Pissarenko
-
Duncan Coutts
-
Georg Martius
-
Greg Buchholz
-
John Velman