[Haskell-cafe] Re: Export Haskell Libraries
SevenThunders
mattcbro at earthlink.net
Fri Apr 13 15:01:49 EDT 2007
jasonm wrote:
>
> While we're on the topic, does anyone know if there exists a similarly
> simple solution like the (last) section "Using both Python & Haskell
> with ctypes" at
> http://wiki.python.org/moin/PythonVsHaskell
> that works on Linux to easily link Haskell libraries/functions into
> Python?
>
> Cheers,
> Jason
>
>
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
What I would do is go through the 'usual' export process of exporting
Haskell to C. You could use the ***_stub.h files that are produced, but
it's usually a bit easier to make your own .h files. After this use swig to
wrap the C callable result into Python. A lot of the build tools seem to
support SWIG these days. I know that CMake does and probably SCONS does to.
What would be nice would be just a touch more automation to handle this.
Maybe we can write some Haskell code to script up the process of linking
together the correct object files for export on the Haskell side. Or perhaps
it suffices to automate it within CMake or SCONS or provide macros or python
scripts to do the same.
--
View this message in context: http://www.nabble.com/Export-Haskell-Libraries-tf3569747.html#a9984796
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
More information about the Haskell-Cafe
mailing list