
Duncan Coutts
[...] People want to write programs using Haskell as an extension language. Think of a plugin system or an embeded language. This is currently possible with ghc but requires some cunning hacks and fiddling with the linker and it has some limiations. [...]
It seems like what you're asking for is partly covered by the foreign function interface specification http://www.cse.unsw.edu.au/~chak/haskell/ffi/ especially foreign export (section 3.4), dynamic wrappers (section 4.1.3), and hs_init and friends (section 6.1). It'd be good if you could express your request in terms of things not provided by this interface, provided in an awkward or inappropriate way, etc. (bearing in mind that the ffi is often accessed indirectly through preprocessors like GreenCard, c2hs, hsc2hs, KDirect, HDirect, etc. which can eliminate much of the awkwardness). -- Alastair Reid alastair@reid-consulting-uk.ltd.uk Reid Consulting (UK) Limited http://www.reid-consulting-uk.ltd.uk/alastair/