I need to write a Haskell application which loads another Haskell plugins on-fly. Plugin is an arbitrary source code, once loaded it runs for a quite long time, so it would be beneficial to compile it somehow before it's used. I also think about using LLVM for that. I assume this is surely an already solved problem. How to do that in a robust way?
Check out the plugins
package: http://hackage.haskell.org/package/plugins. That's what I've used to get dynamic loading of Haskell code in the past. There's also http://hackage.haskell.org/package/plugins-auto which is a wrapper around plugins
so it could be worth taking a look too.
edit: If you want to go deeper here's a paper describing the plugins package www.cse.unsw.edu.au/~chak/papers/hs-plugins.ps.gz
Take a look at XMonad. It does this. http://xmonad.org
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With