úÎXÊTd5      !"#$%&'()*+,-./01234 555.A data structure representing an XML element. 'Character data just contains a string. 6Tags have a name, a list of attributes, and a list of  child elements.  Follow a "path"- of named subtags in an XML tree. For every ? element in the given list, find the subtag with that name and  proceed recursively. 0Get the value of an attribute in the given tag. 4Get the character data subelement of the given tag. >Convert the tag back to XML. If the first parameter is true,  close the tag. 6,Replace special characters to XML entities. 789:;<=>?@ADefault xmlPath doesn't find subtag2 if we have  tag1subtag1 and tag1subtag2 in xml stanza. BC789:;<789:;< /A class for various kinds of XMPP connections. *Get incoming stanzas from the connection. !Send a stanza on the connection. Close the connection.     An XMPP connection over TCP. DAOpen a TCP connection to the named server, port 5222, and send a 7 stream header. This should really check SRV records. >Get the stream header that the server sent. This needs to be 4 called before doing anything else with the stream. EF  3Get username part of JID, i.e. the part before the @ sign.  Return "" if the JID contains no @ sign. .Get resource part of JID, i.e. the part after /.  Return "" if the JID has no resource. 7Get the bare JID, i.e. everything except the resource. GHIJ>A function in the XMPP monad behaves a bit like a thread in a @ cooperative threading system: when it decides to wait for more  input, it "sleeps", letting other "threads" run, until input ' matching a certain predicate arrives. KL!A handler function for a stanza. MA stanza predicate. NOPQBRun a function in the XMPP monad using the given XMPP connection. D After that, keep looping as long as there are handlers waiting for  incoming stanzas. Send an XMPP stanza. =When a stanza matching the predicate arrives, call the given C handler. This is analogous to spawning a new thread, except that  the "thread"4 is only run if and when a matching stanza arrives. BStanza handlers can be one-shot or permanent, as indicated by the  third argument. Stanza predicate. Stanza handler. Catch more than one stanza? ASuspend execution of current function while waiting for a stanza  matching the predicate. @Terminate the loop as soon as the current function exits. This 4 works by removing all stanza handlers, which makes  exit. RS  9Send an IQ request, returning the randomly generated ID. JID of recipient Type of IQ, either "get" or "set" Payload elements ID of sent stanza ?Send an IQ request and wait for the response, without blocking  other activity. JID of recipient Type of IQ, either "get" or "set" Payload elements Response stanza T)Send a response to a received IQ stanza. #Original stanza, from which id and  recipient are taken Type of response, either  "result" or "error" Payload elements Just () if original stanza had  a "from" attribute 1Return true if the message stanza has body text. 1Get the body text of the message stanza, if any. Send an ordinary "chat" type message. JID of recipient Text of message Send ordinary online presence. ! Conjunction ("and") of two predicates. U+Return true if the tag has the given name. ",Return true if the tag is a message stanza. #-Return true if the tag is a presence stanza. $(Return true if the tag is an IQ stanza. %*Return true if the tag is a chat message. &AApply the predicate to the named attribute. Return false if the  tag has no such attribute. Attribute name Attribute value predicate '1Return true if the stanza is from the given JID. (BReturn true if the stanza is an IQ stanza in the given namespace. )Return true if the stanza is a "get"! request in the given namespace. *Return true if the stanza is a "set"! request in the given namespace. +?Establish a handler for answering to version requests with the 5 given information. See XEP-0092: Software Version.  Client name Client version Operating system , Return stanza's error code or -1 (if can't parse error node).  Zero if no error.  !"#$%&'()*+, !"#$%&'()*+, --Non-SASL authentication, following XEP-0078. Username (part before @ in JID) Server (part after @ in JID)  Password 1Resource (unique identifier for this connection) 0Error number. Zero if authentication succeeded. --..Return true if the stanza is from a JID whose "username@server"  part matches the given string. /Join groupchat. Nickname to use  JID of room #Password of room. Use empty if no. .Error number. Zero if joining room succeeded. 0Leave groupchat. 1/Return true if the stanza is a message of type " groupchat". 2BReturn true if the stanza is a private message in the named room. 3Send a groupchat message. JID of chat room Text of message 4'Send a private message in a chat room. Nick of recipient JID of chat room Text of message ./01234./01234./01234-  !"#$%&'()*+,-. !&"#$%'()*+,-  V  !"#$%& ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9:;<=>?@ABCDEFGHIJKLMNOPNQRSTUVWX YZ[\]^_` a bc XMPP-0.0.2 Network.XMPPNetwork.XMPP.MUCNetwork.XMPP.MyDebugNetwork.XMPP.XMLParseNetwork.XMPP.XMPPConnectionNetwork.XMPP.TCPConnectionNetwork.XMPP.JIDNetwork.XMPP.XMPPMonadNetwork.XMPP.StanzasNetwork.XMPP.Auth mtl-1.1.1.0Control.Monad.TransliftIOXMLElemCDataXMLxmlPathgetAttrgetCdata xmlToStringxmlPath'XMPPConnection getStanzas sendStanzacloseConnection TCPConnection openStreamgetStreamStart getUsername getResource getBareJidXMPP StanzaHandlerStanzaPredicaterunXMPP addHandler waitForStanzaquitsendIq sendIqWaithasBodygetMessageBody sendMessage sendPresenceconj isMessage isPresenceisIqisChatattributeMatchesisFromiqXmlnsiqGetiqSet handleVersion getErrorCode startAuth matchesBare joinGroupchatleaveGroupchatisGroupchatMessageisGroupchatPrivmsgsendGroupchatMessagesendGroupchatPrivateMessagemyDebugreplaceToEntities attrsToStringgetRestxmppStreamStart shallowTagdeepTagsdeepTagtagStart attributecdata tokenCharprocessingInstruction parsec-3.1.0Text.Parsec.StringParserText.Parsec.Primparse parseBuffered getStringXMPPRes WaitingForXMPPJust XMPPStatexmppFnStanzaHandlerPartgetStateputState modifyState initialState actOnStanza findHandlersendIqResponse hasNodeName