[Haskell-cafe] Some Haskell platformish questions

Jeremy O'Donoghue jeremy.odonoghue at gmail.com
Thu Aug 2 10:37:09 EDT 2007

Hi David,

On 01/08/07, David Pollak <feeder.of.the.bears at gmail.com> wrote:


> Can GHC generate stand-alone executables with all the dependencies linked in
> such that I can distribute the single file without worrying about including
> a bunch of DLLs/SOs? The answer seems to be yes, but I wanted to confirm.

Yes - and I've found it to be easy (on Windows) to wrap the whole
thing in an InnoSetup installer.

> How much of a distribution footprint is the Haskell runtime?  If I have a
> "Hello World" app, roughly how big will the EXE be (if one includes the JRE
> in the runtime, a Java/Scala program has a minimum footprint of 20M...
> that's big.)

I wrote a moderately complex GUI application for exploring and viewing
the contents of ELF binaries.

It comes up as an 8MB executable with another 4.6MB of DLLs (wxWidgets
at 2.7MB and the wxWidgets wrapper for wxhaskell at 1.8 MB). This
makes pretty extensive use of various Haskell libraries, and is
probably realistic for a GUI app of moderate complexity.

> Same goes for the runtime... I've looked at the stats on the Language
> Shootout home page and these look encouraging, but I wanted to see if the
> reasonable footprint is a reality.

Footprint is actually very reasonable. While browsing ELF binaries of
around 100MB, footprint is about 50MB, and I didn't try optimizing
very hard - it was 'good enough' out of the box.

> How real/solid/stable is the wxHaskell widgets package?  Is it being well
> maintained?  Is there (okay... this is pie in the sky) an GUI Builder for
> it?

I'm one of the maintainers of wxHaskell. It is maintained, but none of
us has anywhere near as much time as we would like (everyone has day
jobs...). It is very stable and reliable, but currently not much fun
to build (although watch this space...). There's no GUI builder, I'm

The big bonus is that it runs well, and natively, on Windows, OS X and Linux.

> How are the Windows/COM bindings in Haskell... would it be possible to, for
> example, embed an IE Browser COM control in a a wxHaskell window?

I've yet to manage such a thing. My impression is that most of the COM
tools for Haskell suffer bit-rot to some degree or another. I've never
managed to get any of them to work properly.

> I understand that Haskell has "a better approach" to parallelizing tasks,
> but I have not seen much about the actual manifestation of this... would
> someone be so kind as to give me a pointer?

Note that some care is needed with GUI packages (wxhaskell for sure,
and I think Gtk2Hs also) when used in multi-threaded environment.

> I tend to do most of my coding in either Emacs or Eclipse... how's the
> Haskell support in either?  Is there a preferred editor (I don't mean to
> start any wars here... :-)

Emacs support is very good. It's where I spend my life (although sadly
more often in C++-mode than Haskell-mode right now...)

> Are there any production Haskell-based desktop apps of note?

The ELF explorer I mentioned early is deployed to about 100 people at
the company where I work, and has required almost no support as it
'just works'. I think this is due more to the excellence of Haskell
type checker than anything I did right...

Sadly I can't open-source it.

I can confirm that it took about 20% of the time to write and debug
than it would have in C++, despite the fact that I've been programming
in C and C++ for 20 years, and didn't know my monads from my functors
when I started :-)

More information about the Haskell-Cafe mailing list