[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haskell-cafe
Subject:    Dynamic linking of Haskell modules?
From:       senganb () ia ! nsc ! com
Date:       2002-01-25 3:10:12
Message-ID: 20020124221012.58526d76.senganb () ia ! nsc ! com
[Download RAW message or body]

I'd like to be able to dynamically load Haskell code
from a "plugin" binary file into a Haskell application,
just as I can dynamically load .so files into a C application.

Since ghci does this, I thought I could copy its implementation
but after looking into it, it's very complicated. I notice
that OCaml can do this (http://algol.prosalg.no/~malc/scaml/)

The only simple solution I can think of is to use FFI to export
the objects in the .so file as following the C interface, and then
importing them into the main Haskell application as "C functions",
but the extra marshalling is ugly.

Has anyone solved this problem?
Are there any plans to support this in the future in ghc or a
third party library?

Sengan



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic