Browse Source

Clear Haddock warnings, create jidQ and newStanzaID Haddock

master
Jon Kristensen 12 years ago
parent
commit
7f2146025c
  1. 3
      source/Network/Xmpp/Concurrent.hs
  2. 6
      source/Network/Xmpp/Stream.hs
  3. 13
      source/Network/Xmpp/Types.hs

3
source/Network/Xmpp/Concurrent.hs

@ -283,6 +283,7 @@ doRetry sess@Session{reconnectWait = rw} = do
threadDelay $ t * 10^(6 :: Int) threadDelay $ t * 10^(6 :: Int)
reconnectNow sess reconnectNow sess
-- | Generates a new stanza identifier based on the 'sessionStanzaIDs' field of
-- 'SessionConfiguration'.
newStanzaID :: Session -> IO Text newStanzaID :: Session -> IO Text
newStanzaID = idGenerator newStanzaID = idGenerator

6
source/Network/Xmpp/Stream.hs

@ -327,9 +327,9 @@ openStream realm config = runErrorT $ do
ErrorT . liftIO $ withStream startStream stream' ErrorT . liftIO $ withStream startStream stream'
return stream' return stream'
-- | Send "</stream:stream>" and wait for the server to finish processing and to -- | Send \"</stream:stream>\" and wait for the server to finish processing and
-- close the connection. Any remaining elements from the server are returned. -- to close the connection. Any remaining elements from the server are returned.
-- Surpresses StreamEndFailure exceptions, but may throw a StreamCloseError. -- Surpresses 'StreamEndFailure' exceptions, but may throw a 'StreamCloseError'.
closeStreams :: Stream -> IO () closeStreams :: Stream -> IO ()
closeStreams = withStream closeStreams' closeStreams = withStream closeStreams'

13
source/Network/Xmpp/Types.hs

@ -79,7 +79,6 @@ import qualified Data.ByteString as BS
import Data.Conduit import Data.Conduit
import Data.Default import Data.Default
import qualified Data.Set as Set import qualified Data.Set as Set
import Data.String (IsString(..))
import Data.Text (Text) import Data.Text (Text)
import qualified Data.Text as Text import qualified Data.Text as Text
import Data.Typeable(Typeable) import Data.Typeable(Typeable)
@ -392,11 +391,11 @@ data StreamErrorCondition
-- Server Dialback, or (2) between a client and a server -- Server Dialback, or (2) between a client and a server
-- via SASL authentication and resource binding. -- via SASL authentication and resource binding.
| StreamInvalidNamespace -- ^ The stream namespace name is something other | StreamInvalidNamespace -- ^ The stream namespace name is something other
-- than "http://etherx.jabber.org/streams" (see -- than \"http://etherx.jabber.org/streams\" (see
-- Section 11.2) or the content namespace declared -- Section 11.2) or the content namespace declared
-- as the default namespace is not supported (e.g., -- as the default namespace is not supported (e.g.,
-- something other than "jabber:client" or -- something other than "jabber:client" or
-- "jabber:server"). -- \"jabber:server\").
| StreamInvalidXml -- ^ The entity has sent invalid XML over the stream to a | StreamInvalidXml -- ^ The entity has sent invalid XML over the stream to a
-- server that performs validation -- server that performs validation
| StreamNotAuthorized -- ^ The entity has attempted to send XML stanzas or | StreamNotAuthorized -- ^ The entity has attempted to send XML stanzas or
@ -541,7 +540,7 @@ instance Error AuthFailure where
-- XML TYPES -- XML TYPES
-- ============================================================================= -- =============================================================================
-- | XMPP version number. Displayed as "<major>.<minor>". 2.4 is lesser than -- | XMPP version number. Displayed as "\<major\>.\<minor\>". 2.4 is lesser than
-- 2.13, which in turn is lesser than 12.3. -- 2.13, which in turn is lesser than 12.3.
data Version = Version { majorVersion :: !Integer data Version = Version { majorVersion :: !Integer
@ -756,6 +755,12 @@ instance Read Jid where
-- or the `parseJid' error message (see below) -- or the `parseJid' error message (see below)
#if WITH_TEMPLATE_HASKELL #if WITH_TEMPLATE_HASKELL
-- | Constructs a @Jid@ value at compile time.
--
-- Syntax:
-- @
-- [jidQ|localpart\@domainpart/resourcepart|]
-- @
jidQ :: QuasiQuoter jidQ :: QuasiQuoter
jidQ = QuasiQuoter { quoteExp = \s -> do jidQ = QuasiQuoter { quoteExp = \s -> do
when (head s == ' ') . fail $ "Leading whitespaces in JID" ++ show s when (head s == ' ') . fail $ "Leading whitespaces in JID" ++ show s

Loading…
Cancel
Save