[Haskell-cafe] Re: Building DLLs

Simon Marlow simonmarhaskell at gmail.com
Fri Sep 26 11:27:14 EDT 2008


Andrew Coppin wrote:
> Andrew Coppin wrote:
>> OK, so a GHC question: Apparently at some point, GHC used to support 
>> DLLs. And then it stopped working. And then it may or may not have 
>> been brought back again... Does anybody know exactly what the status 
>> of this is? Is it currently working or broken? If it's working, what 
>> can and can't you use it for? And how do you work it? ;-)
> 
> Since nobody seems inclined to offer any help on this one, I started 
> digging around with Google.
> 
> It appears that this used to work sometime around 6.4.x, and then for 
> some reason it stopped working. The docs for 6.8.3 indicate that you can 
> compile a Haskell program as a DLL instead of an EXE, but that's it.
> 
> The GHC Developer Wiki promises that this feature will "definitely" be 
> back in GHC 6.10. But then, the same page promises an RC by 19 Sep 2008.
> 
> More digging and I discover various status pages that suggest that this 
> functionallity isn't working in HEAD yet, and will probably actually end 
> up in 6.10.2 or maybe 6.10.3.
> 
> Looking at the surface, it appears as if not very much is currently 
> going on with GHC. And then, by pure chance, I happened across a link 
> that allows you to access the GHC developers' mailing list, and 
> woooooo-boy, it looks pretty damned busy in there! o_O

There's nothing closed about the GHC developer list - feel free to join, 
or just read it from the archives or GMane.

http://haskell.org/mailman/listinfo/cvs-ghc

On the subject of DLLs, there's an important distinction to make.

  1. putting the whole program/library in a DLL that you can call from C

  2. putting individual Haskell packages in DLLs that you can call from
     Haskell.

(1) has always been supported (temporary breakage notwithstanding) and 
as far as I know will work in 6.10.1.  (2) was supported a long time ago 
for a short while, and we'd like to bring it back, but as part of a 
multi-platform effort to support shared libraries.

To get (1) you just do ghc -shared, I believe (I'm not by a Windows 
machine right now so can't check).

Cheers,
	Simon



More information about the Haskell-Cafe mailing list