Calling C++ from Haskell - Haskell

Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.

Luc Tielen

I wrote an article on how to call C++ from Haskell:
Feedback welcome! :smile:

Luc's personal blog
Torsten Schmits

pretty cool! I've done a bit of CFFI work and this looks painful in a different way :sweat_smile: but probably less than constructing a sum type from a void pointer, an enum tag and manually translated data layouts :smile:

Luc Tielen

The most work went into figuring out those techniques (like the loops) and making sure that no memory leaks/memory corruption occur (a.k.a. "who is responsible for the data").
Now you can apply this approach in a "straightforward" kind of way. :smile: But yes, it involves writing quite a bit of C++ code.. :sweat_smile:

Georgi Lyubenov // googleson78

I'm not personally going to use this, but thanks for sharing, I know how much of a pain these things can be :sweat_smile: