[Haskell-cafe] What is simplest extension language to implement?

Malcolm Wallace malcolm.wallace at me.com
Thu Nov 4 14:59:58 EDT 2010


On 4 Nov 2010, at 17:52, Luke Palmer wrote:

> On Thu, Nov 4, 2010 at 5:30 AM, Malcolm Wallace <malcolm.wallace at me.com 
> > wrote:
>>> ehm. I missed something and ghc api is well documented and stable ?
>>
>> There are other ways of adding Haskell as a scripting language -  
>> bundling
>> ghc is not necessary.
>
> Do tell.

Well, our solution is not entirely off-the-shelf, and possibly not to  
everyone's taste or ability, but we wrote our own Haskell "compiler",  
and a bunch of auto-generation tools (and FFI magic) that expose the  
underlying application's APIs (written in both Haskell and C++) as  
import-able modules into the scripting-Haskell layer.

When I say "we", of course I mean Lennart, who may have some previous  
experience in writing Haskell compilers...

But this one is based on many freely available packages like haskell- 
src-exts and uniplate, so lots of the hard work had already been done  
for us.  And who knows, perhaps one day enough of the other parts of a  
basic compiler (name resolver, type checker, translator to core) might  
appear in Hackage to make it easy for anyone to write their own  
scripting engine.

Regards,
     Malcolm


More information about the Haskell-Cafe mailing list