Visual Haskell
Simon Marlow
simonmarhaskell at gmail.com
Mon Apr 24 05:08:03 EDT 2006
Dmitri Pissarenko wrote:
> First of all I want to thank all the people, who developed Visual
> Haskell. It's a big step towards functional programming in real life.
>
> I have an application in C# in Visual Studio 2005 and Visual Haskell,
> which seems to work only in Visual Studio 2003 (both Visual Studios are
> installed on my computer).
>
> Now, is it possible to write parts of the C# application in Visual Haskell?
>
> If yes, is there any downloadable tutorial about how one can use Visual
> Haskell in collaboration with other Microsoft languages?
I'm by no means an expert on this, but I believe it's certainly
*possible* to invoke Haskell from C#. It might not be very easy, though.
The basic mechanism is that you expose the Haskell functionality via the
FFI (foreign export), and then invoke this from your C# code as you
would invoke C code.
In order to do this, you probably want to put the Haskell code into a
DLL. There's some new documentation on the wiki you should find useful:
http://www.haskell.org/haskellwiki/GHC/Using_the_FFI
Note that while loading the Haskell DLL should work fine, there are
currently problems with unloading, especially repeatedly loading and
unloading Haskell DLLs.
Cheers,
Simon
More information about the Glasgow-haskell-users
mailing list