[Haskell-cafe] GHC's dynamic linker and Windows

Austin Seipp mad.one at gmail.com
Mon Jan 7 08:20:05 EST 2008

> I recently tried the latest version of HS-PLUGINS, and it gave an error on
> Windows. After a bit of Googling it seemed Conal Elliot had the same
> problem. I reported this problem to the author. This is also (one of) the
> reason why I could not get YI running on Windows.
Currently I believe Conal is working on getting the latest hs-plugins to 
work on windows. It was recently updated to work with ghc 6.8.x (thanks
Cale & co.) but there was no release as the aim is to get it working for
6.8 on both windows and linux before making an official release
(currently it seems to be linux only, as I have the latest 1.1 installed
 from the repo below.) The latest repo for hs-plugins for 6.8 can be found at

I'm sure Conal and others would appreciate any patches to help move it
> Now, according to the documentation, HS-PLUGINS seems to be mainly a handy
> wrapper around GHC's dynamic linker and compiler. Suppose I would use GHC's
> dynamic linker, interpreter and compiler directly (aha "GHC as a library");
> does this work on Windows, or are there known problems with these?

It's a wrapper around the RTS' linker for the most part, yes. Another
half of it was interface files; GHC .hi interfaces change extremely
quickly inbetween even bugfix releases (and probably changes many times
even between those.) This made it hard to update for newer release of
GHC. Cale ported a lot of that to using the GHC API explicitly however,
which should hopefully make it more resilient to newer GHC releases.

GHC as a library does work on windows and it is usable. I wrote a blog
post over using the API but unfortunately where it was hosted is down as
of current. It does seem however google cache'd the page nicely though
if it's of any interest to you:


I also wrote a library that was a small wrapper around the GHC API. The
darcs repository can be found here:


Note it only works on GHC 6.6.x as of right now and I've not had time to
update it for 6.8. It's a sufficiently simple library though, so porting
it to using 6.8 should not be hard at all (I did so on my windows box,
with very few changes required.)

Hope this helps!

- Austin

"It was in the days of the rains that their prayers went up, 
not from the fingering of knotted prayer cords or the spinning 
of prayer wheels, but from the great pray-machine in the
monastery of Ratri, goddess of the Night."
 Roger Zelazny

More information about the Haskell-Cafe mailing list