Cartesius00
Cartesius00

Reputation: 24414

Loading Haskell plugins on-the-fly

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?

Upvotes: 7

Views: 281

Answers (2)

Daniel
Daniel

Reputation: 27639

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

Upvotes: 6

Tim Dysinger
Tim Dysinger

Reputation: 19

Take a look at XMonad. It does this. http://xmonad.org

Upvotes: 1

Related Questions