dispatchLoop :: Server -> IO ()
dispatchLoop serv = do
 e <- takeMVar $ _mv serv
 putStrLn "got event"
 serv' <- case e of
  Init -> do recv'event'id serv "init"
  Destroy -> do recv'event'id serv "destroy"
  Connection mv -> do recv'event'connection serv mv
  Disconnect id' -> do recv'event'disconnect serv id'
  Delivery _ -> do recv'event'id serv "destroy"
  Debug mv -> do recv'event'debug serv mv
 dispatchLoop serv'
dispatchLoop :: Server -> IO ()
dispatchLoop serv = do
 e <- takeMVar $ _mv serv
 putStrLn "got event"
 serv' <- case e of
  Init -> do recv'event'id serv "init"
  Destroy -> do recv'event'id serv "destroy"
  Connection mv -> do recv'event'connection serv mv
  Disconnect id' -> do recv'event'disconnect serv id'
  Delivery _ -> do recv'event'id serv "destroy"
  Debug mv -> do recv'event'debug serv mv
 dispatchLoop serv'
dispatchLoop serv = do
 e <- takeMVar $ _mv serv
 putStrLn "got event"
 serv' <- case e of
  Init -> do recv'event'id serv "init"
  Destroy -> do recv'event'id serv "destroy"
  Connection mv -> do recv'event'connection serv mv
  Disconnect id' -> do recv'event'disconnect serv id'
  Delivery _ -> do recv'event'id serv "destroy"
  Debug mv -> do recv'event'debug serv mv
 dispatchLoop serv'