GHC's dynamic linker and Windows

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
bf3
Reply | Threaded
Open this post in threaded view
|

GHC's dynamic linker and Windows

bf3

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.

 

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?

 

Thanks,

Peter

 

 

 

 


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: GHC's dynamic linker and Windows

Austin Seipp
> 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

http://code.haskell.org/~dons/code/hs-plugins
 
I'm sure Conal and others would appreciate any patches to help move it
along!
> 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:

http://www.google.com/search?q=cache:DXz9SkIg0OAJ:austin.youareinferior.net/%3Fq%3Dnode/29+using+the+GHC+API+pluggable+austin&hl=en&ct=clnk&cd=1&gl=us

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

http://code.haskell.org/metaplug/

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
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: GHC's dynamic linker and Windows

Gwern Branwen
On 2008.01.07 07:20:05 -0600, Austin Seipp <[hidden email]> scribbled 2.6K characters:

> > 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
>
> http://code.haskell.org/~dons/code/hs-plugins
>
> I'm sure Conal and others would appreciate any patches to help move it
> along!
Ah. That explains it. I'd been annoyed for some time now that hs-plugins was broken for so long with 6.8.x, but I had been pulling from <http://www.cse.unsw.edu.au/~dons/code/hs-plugins>.

It's probably worth noting that the first Google hit for 'hs-plugins' is Don's pages, and that points to the old Darcs repo, <http://www.cse.unsw.edu.au/~dons/hs-plugins/hs-plugins-Z-H-1.html#node_sec_1> ("Darcs repository of the latest code: darcs get --set-scripts-executable http://www.cse.unsw.edu.au/~dons/code/hs-plugins").

The second and third hits links to that page as well. Maybe the docs could be upgraded and the usual deprecation warning inserted in the old repo?

--
gwern
GSM Submarine E. 510 ddnp building y friends RDI JCET
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe

attachment0 (196 bytes) Download Attachment