[Haskell-cafe] Some Haskell platformish questions

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Wed Aug 1 17:43:01 EDT 2007

On Wed, 2007-08-01 at 13:48 -0700, David Pollak wrote:

> So... on to the questions:

First of all I recommend you check out these resources:

The standard libraries:

A large collection of other libraries:

Another directory of apps and libraries, many of which are not yet
available through hackage:

>       * 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, but the same is not true of any C dlls you link to, eg GUI libs
like gtk or wx.

>       * 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.)

Statically linked hello world is 470K on my amd64 linux box. An
equivalent GUI hello world with Gtk2Hs is 540K.

These are still dynamically liked to libc and libgmp.

>       * 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.

Not sure what you're asking here. The ghc rts is linked into the

>       * 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?

Perhaps someone who uses wxHaskell can help you with that. I help
maintain Gtk2Hs so can tell you about that...

Gtk2Hs is well maintained imho :-) We do releases roughly every 6
months. The last one was a couple weeks ago. It has an installer for
Windows and it's included in several other platforms like debian,
fedora, gentoo, freebsd and macports.

The glade GUI builder can be used with Gtk2Hs on all platforms.

>       * 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?

There is a COM tool, not sure about embedding IE. Gtk2Hs supports
embedding the mozilla rendering engine, though not on Windows at the

HDirect has not seen much maintenance but apparently there is an updated
version that was used in VisualHaskell. Perhaps someone else can tell
you more about HDirect, I'm not especially familiar with it.

>       * I found a package to do HTTP requests in Haskell but it does
>         not seem to support HTTPS.  Is there an HTTPS client package
>         for Haskell?

There's work on a libcurl binding going on at the moment.

>       * How are Strings internally represented?  Are they single byte
>         or multi-byte characters?  How easy it is to translate to/from
>         internal representation to UTF-8?

Strings are represented as ordinary Haskell lists of Unicode code
points. There are functions available for converting to and from byte
sequences in UTF8 and other encodings (though not in the base packages
at the moment).

Both Gtk2Hs and wxHaskell support Unicode.

>       * How's the XML support?  Will the XML parser handle non-Latin
>         characters and properly encode stuff?  Does XML get parsed
>         down into easily mappable/filterable collections?

There are 2 major xml packages, HaXml and HXT. You can download them and
find their documentation on http://hackage.haskell.org/

>       * Is there support for SHA256 (I saw an SSLeay package which had
>         support for a lot of stuff, but not SHA256)?

The Crypto package supports SHA1.

>       * 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?

Look for Haskell's lightweight threads, STM and parallel strategies:


>       * On a related note, I have become a fan (via Scala) of
>         Erlang-style Actors and asynchronous message passing.  Are
>         there any similar packages for Haskell?

Not so far as I know, though the concurrency library supports channels
so you can use a pattern where a thread reads messages from a channel
and post's messages to other channels.

>       * 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, vim, nedit, gedit and others support Haskell syntax highlighting.
Emacs has some additional ghci integration mode. There's a project to
add Haskell support to Eclipse, though I'm not sure how mature it is.

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

xmonad, an X11 window manager
VisualHaskell, a Haskell extension to VisualStudio

There are a number of programs that use Gtk2Hs or wxHaskell which you
can find linked from their websites including:

dazzle, http://wxhaskell.sourceforge.net/applications.html
pivotal, http://www.cs.kent.ac.uk/projects/pivotal/
himerge, http://fmap.us/himerge.html
HRay, http://trappist.elis.ugent.be/~kehoste/Haskell/HRay/


More information about the Haskell-Cafe mailing list