[Haskell-cafe] C++ interface with Haskell

Dan Mead d.w.mead at gmail.com
Wed Apr 16 10:40:44 EDT 2008


write the C wrapper that calls haskell, then link that to your C++ objects

I think what you're really asking is how to call C from C++

-Dan

2008/4/16 Miguel Lordelo <miguellordelo at gmail.com>:

> 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
>
> Chears,
> Miguel Lordelo.
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20080416/7af69145/attachment.htm


More information about the Haskell-Cafe mailing list