From 11f2f73a9157a6f12c244d23acc58c7f7c340e3e Mon Sep 17 00:00:00 2001 From: Jon Kristensen Date: Mon, 18 Feb 2013 01:38:06 +0100 Subject: [PATCH] Export StanzaID; rename StanzaId constructor --- source/Network/Xmpp/Internal.hs | 1 + source/Network/Xmpp/Types.hs | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/source/Network/Xmpp/Internal.hs b/source/Network/Xmpp/Internal.hs index 74b1cbe..0f42742 100644 --- a/source/Network/Xmpp/Internal.hs +++ b/source/Network/Xmpp/Internal.hs @@ -43,6 +43,7 @@ module Network.Xmpp.Internal , pullFinalMessage , Pairs(..) , quote + , StanzaId(..) ) where diff --git a/source/Network/Xmpp/Types.hs b/source/Network/Xmpp/Types.hs index c8da297..7b73644 100644 --- a/source/Network/Xmpp/Types.hs +++ b/source/Network/Xmpp/Types.hs @@ -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.