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