[Haskell] Programme terminates silently
thomas.bevan at gmail.com
Sat May 31 03:53:26 EDT 2008
I've written the programme below.
The lircLoop should never terminate. Unfortunately it does. Worse, no error
messages are generated.
Not even the final line "Closing down" is printed.
How is this possible?
Thanks for your help.
import Hmpf.Tree as T
import Control.Concurrent hiding (forkIO)
import Prelude hiding (catch)
import Control.Monad.Trans (liftIO)
main :: IO ()
main = do
lirc <- newChan
lcd <- newChan
startLirc device lirc
startLCD "localhost" 13666 lcd
forkIO logger $
mpdLoop lcd mpd
catch (lircLoop lirc lcd mpd)
(\e -> errorM logger "Lirc loop died" >> (errorM logger (show e)))
putStrLn "Closing down"
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell