diff --git a/README.md b/README.md
index 71f0078..637d57f 100644
--- a/README.md
+++ b/README.md
@@ -94,7 +94,7 @@ is the same as Presence Nothing Nothing Nothing Nothing Available
[].
Now, let's say that we want to receive all message stanzas, and echo the stanzas
-back to the recipient. This can be done like so:
+back to the sender. This can be done like so:
forever $ do
msg <- getMessage sess
diff --git a/source/Network/Xmpp/Concurrent/Monad.hs b/source/Network/Xmpp/Concurrent/Monad.hs
index 6a894bc..7b8f360 100644
--- a/source/Network/Xmpp/Concurrent/Monad.hs
+++ b/source/Network/Xmpp/Concurrent/Monad.hs
@@ -93,7 +93,7 @@ runHandler h session = h =<< atomically (readTMVar $ eventHandlers session)
-- | End the current XMPP session. Kills the associated threads and closes the
-- connection.
--
--- Note that XMPP clients (that has signalled availability) should send
+-- Note that XMPP clients (that have signalled availability) should send
-- \"Unavailable\" presence prior to disconnecting.
--
-- The connectionClosedHandler will not be called (to avoid possibly
diff --git a/source/Network/Xmpp/IM/Message.hs b/source/Network/Xmpp/IM/Message.hs
index cdd2c32..a11ee2b 100644
--- a/source/Network/Xmpp/IM/Message.hs
+++ b/source/Network/Xmpp/IM/Message.hs
@@ -30,7 +30,7 @@ data InstantMessage = InstantMessage { imThread :: Maybe MessageThread
, imBody :: [MessageBody]
}
--- | Empty instant message
+-- | Empty instant message.
instantMessage :: InstantMessage
instantMessage = InstantMessage { imThread = Nothing
, imSubject = []
@@ -49,7 +49,7 @@ sanitizeIM :: InstantMessage -> InstantMessage
sanitizeIM im = im{imBody = nubBy ((==) `on` bodyLang) $ imBody im}
-- | Append IM data to a message. Additional IM bodies with the same Langtag are
--- discarded
+-- discarded.
withIM :: Message -> InstantMessage -> Message
withIM m im = m{ messagePayload = messagePayload m
++ pickleTree xpIM (sanitizeIM im) }
@@ -65,11 +65,11 @@ simpleIM to bd = withIM message{messageTo = Just to}
instantMessage{imBody = [MessageBody Nothing bd]}
-- | Generate an answer from a received message. The recepient is
--- taken from the original sender, the sender is set to Nothing,
+-- taken from the original sender, the sender is set to 'Nothing',
-- message ID, language tag, message type as well as subject and
-- thread are inherited.
--
--- Additional IM bodies with the same Langtag are discarded
+-- Additional IM bodies with the same Langtag are discarded.
answerIM :: [MessageBody] -> Message -> Maybe Message
answerIM bd msg = case getIM msg of
Nothing -> Nothing
diff --git a/source/Network/Xmpp/IM/Presence.hs b/source/Network/Xmpp/IM/Presence.hs
index 82077ac..14d4b6f 100644
--- a/source/Network/Xmpp/IM/Presence.hs
+++ b/source/Network/Xmpp/IM/Presence.hs
@@ -29,8 +29,8 @@ imPresence = IMP { showStatus = Nothing
instance Default IMPresence where
def = imPresence
--- | Try to extract RFC6121 IM presence information from presence stanza
--- Returns Nothing when the data is malformed, (Just IMPresence) otherwise
+-- | Try to extract RFC6121 IM presence information from presence stanza.
+-- Returns Nothing when the data is malformed, (Just IMPresence) otherwise.
getIMPresence :: Presence -> Maybe IMPresence
getIMPresence pres = case unpickle xpIMPresence (presencePayload pres) of
Left _ -> Nothing
diff --git a/source/Network/Xmpp/IM/Roster.hs b/source/Network/Xmpp/IM/Roster.hs
index 4e8121e..d50e16b 100644
--- a/source/Network/Xmpp/IM/Roster.hs
+++ b/source/Network/Xmpp/IM/Roster.hs
@@ -32,7 +32,7 @@ timeout :: Maybe Integer
timeout = Just 3000000 -- 3 seconds
-- | Push a roster item to the server. The values for approved and ask are
--- ignored and all values for subsciption except "remove" are ignored
+-- ignored and all values for subsciption except "remove" are ignored.
rosterPush :: Item -> Session -> IO (Either IQSendError (Annotated IQResponse))
rosterPush item session = do
let el = pickleElem xpQuery (Query Nothing [fromItem item])
@@ -40,7 +40,7 @@ rosterPush item session = do
-- | Add or update an item to the roster.
--
--- To update the item just send the complete set of new data
+-- To update the item just send the complete set of new data.
rosterAdd :: Jid -- ^ JID of the item
-> Maybe Text -- ^ Name alias
-> [Text] -- ^ Groups (duplicates will be removed)
@@ -57,7 +57,7 @@ rosterAdd j n gs session = do
}])
sendIQA' timeout Nothing Set Nothing el session
--- | Remove an item from the roster. Return True when the item is sucessfully
+-- | Remove an item from the roster. Return 'True' when the item is sucessfully
-- removed or if it wasn't in the roster to begin with.
rosterRemove :: Jid -> Session -> IO Bool
rosterRemove j sess = do
@@ -74,7 +74,8 @@ rosterRemove j sess = do
getRoster :: Session -> IO Roster
getRoster session = atomically $ readTVar (rosterRef session)
--- | Get the initial roster / refresh the roster. You don't need to call this on your own
+-- | Get the initial roster or refresh the roster. You don't need to call this
+-- on your own.
initRoster :: Session -> IO ()
initRoster session = do
oldRoster <- getRoster session
diff --git a/source/Network/Xmpp/Types.hs b/source/Network/Xmpp/Types.hs
index 6bd35a2..c62b5bc 100644
--- a/source/Network/Xmpp/Types.hs
+++ b/source/Network/Xmpp/Types.hs
@@ -449,7 +449,7 @@ data StreamErrorCondition
-- than \"http://etherx.jabber.org/streams\" (see
-- Section 11.2) or the content namespace declared
-- as the default namespace is not supported (e.g.,
- -- something other than "jabber:client" or
+ -- something other than \"jabber:client\" or
-- \"jabber:server\").
| StreamInvalidXml -- ^ The entity has sent invalid XML over the stream to a
-- server that performs validation
@@ -474,8 +474,8 @@ data StreamErrorCondition
-- not to be used when the cause of the error
-- is within the administrative domain of the
-- XMPP service provider, in which case the
- -- condition is more
- -- appropriate.
+ -- \ condition is
+ -- more appropriate.
| StreamReset -- ^ The server is closing the stream because it has new
-- (typically security-critical) features to offer, because
-- the keys or certificates used to establish a secure context