Browse Source

Export StanzaID; rename StanzaId constructor

master
Jon Kristensen 13 years ago
parent
commit
11f2f73a91
  1. 1
      source/Network/Xmpp/Internal.hs
  2. 10
      source/Network/Xmpp/Types.hs

1
source/Network/Xmpp/Internal.hs

@ -43,6 +43,7 @@ module Network.Xmpp.Internal @@ -43,6 +43,7 @@ module Network.Xmpp.Internal
, pullFinalMessage
, Pairs(..)
, quote
, StanzaId(..)
)
where

10
source/Network/Xmpp/Types.hs

@ -81,18 +81,18 @@ import qualified Text.StringPrep as SP @@ -81,18 +81,18 @@ import qualified Text.StringPrep as SP
-- |
-- Wraps a string of random characters that, when using an appropriate
-- @IDGenerator@, is guaranteed to be unique for the Xmpp session.
-- @IdGenerator@, is guaranteed to be unique for the Xmpp session.
data StanzaId = SI !Text deriving (Eq, Ord)
data StanzaId = StanzaId !Text deriving (Eq, Ord)
instance Show StanzaId where
show (SI s) = Text.unpack s
show (StanzaId s) = Text.unpack s
instance Read StanzaId where
readsPrec _ x = [(SI $ Text.pack x, "")]
readsPrec _ x = [(StanzaId $ Text.pack x, "")]
instance IsString StanzaId where
fromString = SI . Text.pack
fromString = StanzaId . Text.pack
-- | The Xmpp communication primities (Message, Presence and Info/Query) are
-- called stanzas.

Loading…
Cancel
Save