[Yhc] Yhc and plugins architecture

Neil Mitchell ndmitchell at gmail.com
Sun Sep 17 12:37:11 EDT 2006


Hi Cedric,

> I was wondering whether Yhc was able to provide dynamic loading of modules.
>
> Let's say I'd wanted to do something like :
>
> myFiboFunction <- loadModule "myPlugin.hbc" "myFiboFunction"
> putStrlLn $ myFiboFunction 10

I can't see any reason why not, and in fact I think you might even be
able to implement it in Haskell using Tom's low level API for querying
code plus the Robert's API for playing with bytecode files. That would
be interesting to see.

Of course, Tom's more likely to know for certain. You'd probably also
want some kind of:

module <- loadModule "myPlugin.hbc"
func <- queryFunction module module

And you'd also have to worry about type safety, but its certainly
feasible I think

Thanks

Neil


More information about the Yhc mailing list