[Haskell-cafe] C++ interface with Haskell

Miguel Lordelo miguellordelo at gmail.com
Wed Apr 16 03:58:03 EDT 2008

Hi all,

Well...somehow I'm a beginner in Haskell. But actually my interest in
Haskell will increase if it is possible to call a haskell function in C++.
Something like GreenCard ( http://www.haskell.org/greencard/ ) simplifying
the task of interfacing Haskell programs to external libraries (usually).
But is there also a task to interface a foreign language with Haskell, but
calling Haskell functions. Or c2hs which is an interface generator that
simplifies the development of Haskell bindings to C libraries.

I want to know this, because in my company some guys are doing some testing
with Frotran and MatLab and I want to show them the power of haskell and the
software which we are using is implemented in C++ (there is the reason to
make Haskel -> C++).

I read somewhere that the only way for C++ calling a haskell function is to
create a binding between Haskell and C and from C to C++, but a easy "Hello
World" example was not there.
Unfortunatelly I couldn't found anything usefull, like an complete example,
or how to compile the code from haskell to C to C++.

Can sombody help me, please :P

Miguel Lordelo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20080416/ea96e956/attachment.htm

More information about the Haskell-Cafe mailing list