Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Loading Haskell plugins on-the-fly

Tags:

haskell

llvm

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?

like image 511
Cartesius00 Avatar asked Sep 26 '12 20:09

Cartesius00


2 Answers

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

like image 161
Daniel Avatar answered Nov 16 '22 17:11

Daniel


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

like image 23
Tim Dysinger Avatar answered Nov 16 '22 18:11

Tim Dysinger