module HXMPPTest where import Control.Concurrent.Chan (Chan, readChan, writeChan) import HXMPP main :: IO () main = do (cc, ch) <- connect "host" 5222 (Just "user", "server", Just "resource") "password" writeChan cc $ presenceEvent Nothing DoNotDisturb (presenceStatus "status") loop ch loop :: Chan HXMPPEvent -> IO () loop c = do e <- readChan c putStrLn $ show e loop c