import Control.Monad.IO.Class import Control.Monad.Trans.Resource -- import Control.Monad.Trans.Class import Data.Conduit import Data.Conduit.List as CL -- import Data.XML.Types import System.Environment import Text.XML.Stream.Parse import XMPPToTox {- parse :: ConduitM Event o (ResourceT IO) () parse = do return () -} showTox :: CryptoMessage -> ResourceT IO () showTox = liftIO . print main :: IO () main = do args <- getArgs let xmlfile = args !! 0 -- runConduit :: Monad m => ConduitM () Void m r -> m r -- test-xmpp.hs:19:51: warning: [-Wdeprecations] -- In the use of ‘$$’ -- (imported from Data.Conduit, but defined in conduit-1.3.0.3:Data.Conduit.Internal.Conduit): -- Deprecated: "Use runConduit and .|" -- -- runResourceT $ parseFile def xmlfile =$= parse $$ return () runResourceT $ runConduit $ do parseFile def xmlfile .| xmppToTox -- CL.mapM_ :: Monad m => (a -> m ()) -> ConduitT a o m () .| CL.mapM_ showTox