Refactored some minor stuff
This commit is contained in:
parent
b9c8e4d404
commit
2f270f8bdf
5 changed files with 14 additions and 9 deletions
6
Main.hs
6
Main.hs
|
@ -25,16 +25,16 @@ main = do
|
|||
|
||||
-- | Dynamic rebooting function
|
||||
reboot :: Module -> a -> IO ()
|
||||
reboot modul' st = do
|
||||
reboot modul' state = do
|
||||
mkstat <- makeAll "Hsbot.hs" [] --ghcargs
|
||||
case mkstat of
|
||||
MakeSuccess _ _ -> do
|
||||
unloadAll modul'
|
||||
ldstat <- load_ "Hsbot/Main.o" [".","Hsbot","Hsbot/Plugins"] "imain'"
|
||||
case ldstat of
|
||||
LoadSuccess v imain' -> do
|
||||
LoadSuccess modul'' imain' -> do
|
||||
putStrLn "REBOOT: Successful recompilation & reloading, rebooting..."
|
||||
imain' v reboot st
|
||||
imain' modul'' reboot state
|
||||
LoadFailure e -> fatality e
|
||||
MakeFailure e -> fatality e
|
||||
where
|
||||
|
|
Reference in a new issue