
Hello All, how would I get myself a working (and easy to use) GUI-library? Fudgets looks good, but I couldn't get it to build. I downloaded the snapshot from 2005, how to compile says make ghc-all; make ghc-install, but it doesn't work. First, in several scripts/makefiles, the ghc version 4.06 was hardwired, after some editing make complained about not finding lmlmk, whatever that is. If that's all that I would need to build it successfully, where would I get it? I also tried FranTk, doesn't look bad either, but has ghc -version 4.04 hardwired, imports IOExts, which I think would have to be replaced with GHC.Exts, and Addr, which I have no clue what it should be now, anyway, it seems pre-hierarchical-libraries, which would mean a lot of editing the source-files. So, since Fudgets does work in principle, - which version should I use and where do I get it? - what else would I have to download to get it to build? - in case it isn't straightforward, how to build it? I have a linux machine with ghc-6.4.1 and hugs, no HBC, NHC, JHC,..., no GTk2hs (would I need that?). Thanks, Daniel -- "In My Egotistical Opinion, most people's C programs should be indented six feet downward and covered with dirt." -- Blair P. Houghton

On Mon, 2006-03-13 at 09:58 +0100, Daniel Fischer wrote:
Hello All,
how would I get myself a working (and easy to use) GUI-library?
There are two main GUI libraries at the moment: Gtk2Hs and wxHaskell. http://haskell.org/gtk2hs/ http://wxhaskell.sourceforge.net/ Both will work with current versions of GHC etc. You can either use distro packages if they're available for your distro or build from source. Personally I'd recommend Gtk2Hs but then I'm biased because I help maintain Gtk2Hs :-). Duncan

I have to concur with Duncan.
I started using Gtk2Hs for a small project and literally within a couple
hours I had a good understanding upon which to build a nice gui as well as
the gui itself. I haven't tried out wxhaskell, but trying gtk2hs and it's
cairo bindings, I fell in love with the simplicity.
Cheers
On 3/13/06, Duncan Coutts
On Mon, 2006-03-13 at 09:58 +0100, Daniel Fischer wrote:
Hello All,
how would I get myself a working (and easy to use) GUI-library?
There are two main GUI libraries at the moment: Gtk2Hs and wxHaskell.
http://haskell.org/gtk2hs/ http://wxhaskell.sourceforge.net/
Both will work with current versions of GHC etc. You can either use distro packages if they're available for your distro or build from source.
Personally I'd recommend Gtk2Hs but then I'm biased because I help maintain Gtk2Hs :-).
Duncan
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Christophe Poucet wrote:
I have to concur with Duncan.
I started using Gtk2Hs for a small project and literally within a couple hours I had a good understanding upon which to build a nice gui as well as the gui itself. I haven't tried out wxhaskell, but trying gtk2hs and it's cairo bindings, I fell in love with the simplicity.
Cheers
I like gtk2hs too. I used it to make gui for my several toy projects. My experience was mostly positive, but I had some troubles: First of all, it's just a binding to GTK+, so if you don't have an expirience with it (as in my case), you have to learn both GTK+ and gtk2hs simultaneously. Secondly, I'm absolutely not satisfied with a size of produced binaries. I hope, I just made something wrong, but I got a 3 megabyte behemot after compiling and stripping my 300-line program. I compiled it with ghc-6.4.1 with "ghc --make Main.hs". objdump -T shows a myriad of symbols with gtk_ prefix and I have a hard time guessing what most of them are doing where :) I haven't looked at wxhaskell yet. Personally I don't like wxWidgets because of it's overall orientation on GDI API and resemblance with MFC. What is about size of binaries produced using it?

On Tue, 2006-03-14 at 09:45 +0300, Dmitry V'yal wrote:
Christophe Poucet wrote:
I have to concur with Duncan.
I started using Gtk2Hs for a small project and literally within a couple hours I had a good understanding upon which to build a nice gui as well as the gui itself. I haven't tried out wxhaskell, but trying gtk2hs and it's cairo bindings, I fell in love with the simplicity.
Cheers
I like gtk2hs too. I used it to make gui for my several toy projects. My experience was mostly positive, but I had some troubles: First of all, it's just a binding to GTK+, so if you don't have an expirience with it (as in my case), you have to learn both GTK+ and gtk2hs simultaneously.
Yeah, we know we're rather lacking in Haskell-oriented tutorials. It's something we hope to have done for our upcoming 1.0 release.
Secondly, I'm absolutely not satisfied with a size of produced binaries. I hope, I just made something wrong, but I got a 3 megabyte behemot after compiling and stripping my 300-line program. I compiled it with ghc-6.4.1 with "ghc --make Main.hs". objdump -T shows a myriad of symbols with gtk_ prefix and I have a hard time guessing what most of them are doing where :)
You didn't do anything wrong. By default that's what happens with large libs built with ghc. However, the current development version (and so the next release version) of Gtk2Hs has support for ghc's "split objects" feature. With this, a simple Gtk2Hs Hello world program is only 30% larger than a trivial Haskell hello world program (main = putStr "Hello World!"). Duncan

Duncan Coutts wrote:
You didn't do anything wrong. By default that's what happens with large libs built with ghc.
However, the current development version (and so the next release version) of Gtk2Hs has support for ghc's "split objects" feature. With this, a simple Gtk2Hs Hello world program is only 30% larger than a trivial Haskell hello world program (main = putStr "Hello World!").
Duncan
Then I'm waiting impatiently for the next release.

Okay, I've got myself gtk2hs now (and remebered what shied me away the first time: click on dowload opens Pandora's cookie box). Seems to work, although linking takes ages and the binaries are awe-inspiringly huge. Now two questions remain (well, two I find fit to post here): - is there a user-manual or tutorial ? - when building with --enable-docs, how far should the ghc-docdir-path reach? I tried /usr/local/share/ghc-6.4.1/html/libraries and /usr/local/share/ghc-6.4.1/html and was confronted with lots of WARNING: could not resolve ... in both cases. Cheers, Daniel Am Montag, 13. März 2006 10:11 schrieben Sie:
On Mon, 2006-03-13 at 09:58 +0100, Daniel Fischer wrote:
Hello All,
how would I get myself a working (and easy to use) GUI-library?
There are two main GUI libraries at the moment: Gtk2Hs and wxHaskell.
http://haskell.org/gtk2hs/ http://wxhaskell.sourceforge.net/
Both will work with current versions of GHC etc. You can either use distro packages if they're available for your distro or build from source.
Personally I'd recommend Gtk2Hs but then I'm biased because I help maintain Gtk2Hs :-).
Duncan
-- "In My Egotistical Opinion, most people's C programs should be indented six feet downward and covered with dirt." -- Blair P. Houghton

On Tue, 2006-03-14 at 17:15 +0100, Daniel Fischer wrote:
Okay, I've got myself gtk2hs now (and remebered what shied me away the first time: click on dowload opens Pandora's cookie box). Seems to work, although linking takes ages and the binaries are awe-inspiringly huge. Now two questions remain (well, two I find fit to post here): - is there a user-manual or tutorial ? - when building with --enable-docs, how far should the ghc-docdir-path reach? I tried /usr/local/share/ghc-6.4.1/html/libraries and /usr/local/share/ghc-6.4.1/html and was confronted with lots of WARNING: could not resolve ... in both cases.
Even when it works perfectly we still get lots of "WARNING: could not resolve ...". There are broken cross references in our docs. We've been fixing these but they're not as high a priority as many other things. You can tell if the docs are linking to the ghc base docs if you don't get warnings about not being able to resolve things like Int and String. Rather embarrassingly, it turns out that --ghc-docdir does nothing at all. It has been a broken option for a couple years. Other people noticed it too recently. I'll be replaced or fixed in the next version. In the mean time I think yo might be able to get the effect with: make HADDOCK="haddock --use-package=base" or whatever other options you need. Otherwise you'll have to make do with docs that are not linked to the ghc base docs (which is not such a great hardship since almost all the links to things in the base package are just for simple types). Or use the docs online which link to the docs on the ghc website. Duncan
participants (4)
-
Christophe Poucet
-
Daniel Fischer
-
Dmitry V'yal
-
Duncan Coutts