to build wxHaskell, or what is the best GUI library on Haskell?

Submitted by jmuk on Fri, 10/13/2006 - 12:27am.

I just tried to build wxHaskell-0.9.4 on my GHC-6.6 system, but I failed.
The error message is follows:
---
wx/src/Graphics/UI/WX/Types.hs:94:0:
Bad interface file: out/wx/imports/Graphics/UI/WXCore/Types.hi
Something is amiss; requested module wx:Graphics.UI.WXCore.Types differs from name found in the interface file wxcore:Graphics.UI.WXCore.Types
---

I am confused by this error message at first, but finally I understand. In GHC 6.6, a restriction that you cannot use two packages together if they contain a module with the same name has been removed. As the result, the package name is embedded into interface files (.hi files) too. Therefore, the interface files of wxcore package cannot be referred because they are different packages.

To solve this problem, you can install wxcore package at first, and then, build wx package with -package wxcore flag. The complete way is the followings.

1. edit makefile as follows:
1-a. -package-name $(WX) -> -package-name $(WX)-0.9.4 -package wxcore
1-b. -package-name $(WXCORE) -> -package-name $(WXCORE)-0.9.4
1-c. remove `wxcore' from the dependency of target `wx'
1-d. remove all dependencies of target `wx-install-files'
2. edit config/wxcore.pkg to eliminate dependencies of lang and concurrency because they are included in base(?)
3. make wxcore
4. sudo make wxcore-install-files wxcore-register
5. make wxcore-clean
6. make wx
7. sudo make wx-install-files wx-register

And then, I compiled some sample codes in wxHaskell, and confirmed they works.
The best way to fix this problem will be cabalization, but I did not try it.

By the way, is wxHaskell active? I see that they stops any actions. If it is inactive, what is the suitable GUI library for Haskell??

I tried to use gtk2hs, but I failed on my GHC 6.6 system. It uses obsolete Data.FiniteMap. I replaced it and corresponding functions as Data.Map, but other compile errors, for example `no such function: emptySet', occurs, and I gave up.

Are there any other libraries?

Submitted by gour on Tue, 10/17/2006 - 1:30pm.

I tried to use gtk2hs, but I failed on my GHC 6.6 system. It uses obsolete Data.FiniteMap. I replaced it and corresponding functions as Data.Map, but other compile errors, for example `no such function: emptySet', occurs, and I gave up.

Darcs version of gtk2hs works with ghc-6.6.

Try: darcs get --partial http://darcs.haskell.org/gtk2hs/

Are there any other libraries?

There is also wxhaskell, but according to #gentoo-haskell stuff, the ebuild (for Gentoo) is not fixed yet.

Sincerely,
Gour

Submitted by jodonoghue on Thu, 10/19/2006 - 7:04am.

I am leading up a group of volunteers who are trying to get wxHaskell moving again.

Current progress is that we have Unicode patches applied so wxHaskell can be used with Unicode builds of wxWidgets. We also have support for building under GHC 6.4.2 and 6.6, and for wxWidgets 2.4.2 and 2.6.2. Currently looking for hosting as it has proven impossible to obtain commit rights to wxhaskell.sourceforge.net.

It's quite slow going as none of us is a 'super Haskell guru', and parts of wxhaskell are rather complex. However, I would hope that you will soon see signs of life...

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.