module Main where import Metaplug import API main = do s <- create ["-fglasgow-exts"] putStrLn "session created" call <- compileCall "Backend.plugin" s let f = rsrc call f ["hi","bye","die"] reload reload :: PState -> IO () reload st = do s <- create ["-fforce-recomp","-fglasgow-exts"] call <- compileCall "Backend.plugin" s putStrLn "Reboot successful..." let f = rsrc call f st reload create x = loadFiles ["Backend.hs"] =<< initSession "/usr/local/lib/ghc-6.6.1" x MakeMode