On Thu, Aug 06, 2009 at 05:22:06PM +1000, Mark Wotton wrote:
Is there a way to build dynamic libraries in jhc such they're linkable and callable from a C driver? I'm hoping to write a bridge between ruby and haskell, and GHC's dynamic lib support seems a bit sketchy currently.
If your interface is constrained to things expressible in the FFI spec, then you can 'foreign export' whatever functions you like from haskell then compile the resulting C file into a shared library. I don't have a specific option that does this automatically, but it should be easy to do by hand once you see the C file it produces. Let me know what issues you run into, if we can come up with a generally useful 'recipe' for creating shared libraries from haskell I'd like to add it as an explicit command line option to jhc. John -- John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/