[Haskell-cafe] Binary serialization, was Re: Abstraction leak

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Thu Jul 5 12:31:07 EDT 2007

On Thu, 2007-07-05 at 17:07 +0100, Paul Moore wrote:
> On 05/07/07, Bulat Ziganshin <bulat.ziganshin at gmail.com> wrote:
> > > * Gzip compress a data stream
> > zlib
> >
> > > * Send an email
> > > * Parse an ini file
> > >> The one thing off the top of my head that Python had was Base64, but that's
> > MissingH
> >
> > > * Calculate the MD5 checksum of a file
> > crypto
> Thanks.
> The need I had for these is no longer current, but sometime I'll try
> an experiment and see how easy it is, on a relatively clean Windows
> box with just GHC installed, to grab and use these libraries.

Just to warn you, a lot of haskell packages that bind to C libs are much
harder to get working on Windows, the zlib package for example.

This is because on all other platforms zlib comes with the system and is
installed in a location where any application can link to it. On Windows
there is no equivalent of /usr/lib you cannot easily install a C lib
somewhere that it can be used by any .exe on the system. 

To make things easier yuo could avoid using -fvia-C and then at least
the zlib header files would not need to be installed, but to run a
program that uses the zlib package you'd still have to copy the zlib.dll
into the same dir as your .exe.

There is a mechanism in newer versions of Windows that allows
installing .dlls systemwide where any .exe can use them, however ghc and
the gcc toolchain do not support them yet. It requires embeding xml
manifests into the .dll and .exe files and you have to be the admin user
to install one of these systemwide .dll things. It's all a bit of a


More information about the Haskell-Cafe mailing list