diff options
author | Julien Dessaux | 2009-08-23 23:07:43 +0200 |
---|---|---|
committer | Julien Dessaux | 2009-08-23 23:07:43 +0200 |
commit | d4103e3e18a36523735af38eace98a64e1068e6e (patch) | |
tree | 8b5995432eaac1c0321cffcb187c7e31a4f1ff23 /Main.hs | |
parent | Added the IRCParser (thx galdor), and PrivMsg handling (simply repeat) (diff) | |
download | hsbot-cb5229276f830eeff3c4cd9dea26e34649eb8cbb.tar.gz hsbot-cb5229276f830eeff3c4cd9dea26e34649eb8cbb.tar.bz2 hsbot-cb5229276f830eeff3c4cd9dea26e34649eb8cbb.zip |
Rebooting now works great, thanks to the communication channel preservation.v0.1.0
Diffstat (limited to '')
-rw-r--r-- | Main.hs | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1,4 +1,5 @@ module Main where + import System.Exit import System.Plugins @@ -27,8 +28,8 @@ main = do imain modul' reboot -- | Dynamic rebooting function -reboot :: Module -> a -> IO () -reboot modul' state = do +reboot :: Module -> a -> b -> IO () +reboot modul' state chan = do mkstat <- makeAll "Hsbot.hs" ghcargs case mkstat of MakeSuccess _ _ -> do @@ -37,7 +38,7 @@ reboot modul' state = do case ldstat of LoadSuccess modul'' imain' -> do putStrLn "REBOOT: Successful recompilation & reloading, rebooting..." - imain' modul'' reboot state + imain' modul'' reboot state chan LoadFailure e -> fatality e MakeFailure e -> fatality e where |