[Haskell-cafe] Win32 GUI bindings
Jason Dagit
dagit at eecs.oregonstate.edu
Tue Jun 27 00:48:53 EDT 2006
I'm looking for recommendations (testimonials?) for GUI libraries for
haskell (ghc 6.5) on the win32 platform that meet my requirements
below. But first, I try to motivate my question.
Bit of background:
I work at a smallish software company and I've been given a project
where I'm supposed to create a prototype which will later be scraped
and a new version will be written that is part of our main product.
The prototype will only ever run on windows and it will be distributed
to customers for a year or two before it is assimilated.
I've used python a bit to prototype the prototype and figure out some
of the basics. I'll need a small GUI (maybe one or two dialogs), an
XML library, a few small parsers and COM support. I was going to put
Haskell back on the shelf and use either python or scala for this
project because of the COM requirement but just today I made a major
breakthrough with H/Direct and it looks like Haskell is back in the
running. So far I plan to use HaXml, parsec and H/Direct but I still
need some way to create a gui.
This project is fairly representative of all the work we do at my
company so I feel if I find a good solution this time it's probably
what I'll focus on using in the future. That's part of the reason I'm
trying out python, Haskell and scala. (Perhaps the real reason is just
that I like playing with languages ;).
Requirements:
Okay, so now that you know why I'm here, let me give you an idea of
what my *ideal* GUI library would be for this project (roughly in
order of importance):
1) Doesn't require the end user to install anything (no dependencies)
2) Looks and feels like windows
3) Robust (or mature)
4) A pleasure to program (boo @ swing)
5) ??
I don't really know the landscape, but this is my (uneducated) idea of
my options:
A) wxWidgets
B) gtk2hs
C) win32 api
D) write the gui in C or C++ and use the FFI to invoke it
E) write the gui in scala or java and use FFI + JNI to invoke it
F) ?? you tell me
I think (although I have yet to verify) that (A) satisfies #1-4, but
(B) doesn't satisfy #1. Is this true? I tried to install wxHaskell
but it turned out to be a real pain. I'm using visual haskell so that
I have COM support (I need the version of H/Direct that ships with
VisualHaskell and VisuallHaskell only ships with ghc 6.5) and that
means I have to compile the less mainstream haskell libraries myself.
I have yet to successfully install wxHaskell on my dev machine at
work.
I think that (C) is going to violate #4 and maybe #3 depending on how
much code I need to write to get the bare windows api to do what I
want. Plus I doubt this makes sense for a long term solution.
I think (D) makes less sense than (C) and I doubt it's a nice way to
do things, I'm probably better off with (C). As for (E), why don't I
just do the whole thing in scala if I'm requiring the GUI to be in
scala?
Advice?
Thanks,
Jason
More information about the Haskell-Cafe
mailing list