I have looking to Haskell questions in SO, and I recovering my university notes on funtional programming as a hobby. But I've always wondered how could something done in Haskell get outside Hugs interpreter and integrate with a C#, C++ or Java project. Has anybody done that? How?
+9
A:
Well, first of all, Haskell compiles to machine code, so you don't have to worry about the interpreter bit.
As far as integrating with other languages, your best bet is the Foreign Function Interface.
Meredith L. Patterson
2009-08-06 13:54:24
That's was exactly what I was looking for. Thanks.
yeyeyerman
2009-08-06 13:58:16
Haskell compiles to machine code via more sophisticated compilers like GHC.
Harold L
2009-08-07 08:20:50
+1
A:
For integrating with .NET projects, there is also http://haskell.forkio.com/dotnet/
Alexey Romanov
2009-08-07 08:11:25
There are some functional features in Python, but it is definitely *not* a functional language.
Adam Byrtek
2009-08-09 22:55:47
A:
To integrate with other code, you need to use the FFI (as was already said). Usually, you would use GHC (the Glasgow Haskell Compiler) and compile to machine code, rather than use an interpreter like Hugs. (Most "real" projects use GHC instead of Hugs.)
Zifre
2009-08-09 22:35:39